cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Barber_Chris
Helper III
Helper III

Powerapps provides day before date from datepicker

Hi,

I have created an app for adding diary entries where the date in input by a date picker. It then goes to flow and created the diary entry in google calendars. 

 

For some reason the date flow is provided is always the day before the selected date. I have had a look at other threads about turning the format to Text but this hasn't worked. 

 

Has anyone come across this before? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Barber_Chris ,

Could you please share a bit more about your scenario?

Do you pass the DatePicker selected date from your canvas app to a Power Automate flow?

 

If you pass the DatePicker selected date from your canvas app to a Power Automate flow, I think your issue is related here. When working data time values in Power Automate flow, it would be converted into UTC format automatically.

 

So when you passed a Selected date value from your canvas app to your flow, you would receive the UTC format of the selected date value in your flow. If you still want to get the selected date value from your canvas app in your flow, I think the "Convert time zone" action could achieve your needs.

I have made a test on my side, please consider take a try with the following workaround:

2.JPG

Within the "Create an event" action of Google Calendar connector, set the Start time field to following expression:

 

formatDateTime(body('Convert_time_zone'), 'yyyy-MM-ddTHH:mm:ss.fffZ')

 

set the End time field to following expression:

 

formatDateTime(addDays(body('Convert_time_zone'),2), 'yyyy-MM-ddTHH:mm:ss.fffZ')

 

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
KrishnaV
Super User III
Super User III

Hi @Barber_Chris ,

 

I would suggest you check on a few things:

  1. First, check the date control default value at DefaultDate property of the control
  2. Ensure that user local time and the server/environment time is same if not convert the date as needed

See this below article explaining in details for date differences:

https://www.inogic.com/blog/2019/06/useful-tip-for-the-local-and-utc-setting-in-powerapps/

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

Regards,

Krishna
If this post helps, then please consider Accept it as the solution and give thumbs-up to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
v-xida-msft
Community Support
Community Support

Hi @Barber_Chris ,

Could you please share a bit more about your scenario?

Do you pass the DatePicker selected date from your canvas app to a Power Automate flow?

 

If you pass the DatePicker selected date from your canvas app to a Power Automate flow, I think your issue is related here. When working data time values in Power Automate flow, it would be converted into UTC format automatically.

 

So when you passed a Selected date value from your canvas app to your flow, you would receive the UTC format of the selected date value in your flow. If you still want to get the selected date value from your canvas app in your flow, I think the "Convert time zone" action could achieve your needs.

I have made a test on my side, please consider take a try with the following workaround:

2.JPG

Within the "Create an event" action of Google Calendar connector, set the Start time field to following expression:

 

formatDateTime(body('Convert_time_zone'), 'yyyy-MM-ddTHH:mm:ss.fffZ')

 

set the End time field to following expression:

 

formatDateTime(addDays(body('Convert_time_zone'),2), 'yyyy-MM-ddTHH:mm:ss.fffZ')

 

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (89,541)