cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rickycrayon
Regular Visitor

How to get tomorrow's date at a specific time, based on current date?

Hi, I'm relatively new to using Microsoft Flow.

 

Let's say the current date is 21/09/22.

 

I want to get the date & time for tomorrow at 10am, so it'll look like 22/09/22 10am. It always has to be 10am the next day.

So far, I've got this:

 

Spoiler
concat(formatDateTime(addDays(utcnow(),1),'dd-MM-yy'), ' ', '10')

 

The result came out like this:

 

2022-09-22 10

 

And it needs to look something like this:

 

Spoiler
2022-09-22T10:00:00.5436463Z

 

 
1 ACCEPTED SOLUTION

Accepted Solutions

Thanks, managed to get it working, although the solution is rather weird and doesn't make sense....

 

Like what the recommendations suggested in that link, I created a Compose:

 

rickycrayon_0-1663733424352.png

 

I then converted the timezone and the weird thing here is that I'm using exactly the same source and destination timezone, which to me seems pointless because there's "no conversion" done essentially:

 

rickycrayon_1-1663733481671.png

 

 

I then use that output for my end time for my Outlook automatic reply:

 

rickycrayon_2-1663733520525.png

 

 

 

And that worked. However, it's pretty much the same result as what I had before, prior to all this timezone conversion stuff. If I take out the timezone conversion, the result is incorrect. If I change the source timezone to UTC+0, the result is also incorrect. So somehow, setting the exact same source timezone fixes the issue, which is weird. Oh well, it works.

 

I was also going to just change the time from e.g. 10:00 (10am) to 22:00, but I felt that it's a crappy solution.

 

View solution in original post

7 REPLIES 7
Sundeep_Malik
Super User
Super User

Instead of concatenating there

Use this

 

formatDateTime(addDays(utcnow(),1),'dd-MM-yyT10:00:00.5436463Z')

 

rickycrayon
Regular Visitor

Thanks, I literally just figured it out last minute too:

 

Spoiler
concat(formatDateTime(addDays(utcnow(),1),'yyyy-MM-dd'), 'T', '10:00:00.0000000Z')

Thanks for your help!

 
rickycrayon
Regular Visitor

Sorry, one more question, how can I convert it to my local timezone? I've tried this but the result comes out with the incorrect time:

 

Spoiler
convertTimeZone((formatDateTime(addDays(utcnow(),1),'yyyy-MM-ddT22:00:00.0000000Z')),'UTC','New Zealand Standard Time')
v-xiaochen-msft
Community Support
Community Support

Hi @rickycrayon ,

 

Glad to see you solved the issue.

Please consider marking the correct reply as a solution and it will close the case. Thanks.

 

Best Regards,

Wearsky

rickycrayon
Regular Visitor

My Flow basically updates the Outlook automatic reply with a start and end time.

 

I'm not sure why, but the start time and end time are correct in Flow, yet they the end time in my Outlook automatic reply is showing 10pm instead of 10am. What am I doing wrong here?

 

rickycrayon_0-1663730475630.png

 

 

 
Sundeep_Malik
Super User
Super User

Thanks, managed to get it working, although the solution is rather weird and doesn't make sense....

 

Like what the recommendations suggested in that link, I created a Compose:

 

rickycrayon_0-1663733424352.png

 

I then converted the timezone and the weird thing here is that I'm using exactly the same source and destination timezone, which to me seems pointless because there's "no conversion" done essentially:

 

rickycrayon_1-1663733481671.png

 

 

I then use that output for my end time for my Outlook automatic reply:

 

rickycrayon_2-1663733520525.png

 

 

 

And that worked. However, it's pretty much the same result as what I had before, prior to all this timezone conversion stuff. If I take out the timezone conversion, the result is incorrect. If I change the source timezone to UTC+0, the result is also incorrect. So somehow, setting the exact same source timezone fixes the issue, which is weird. Oh well, it works.

 

I was also going to just change the time from e.g. 10:00 (10am) to 22:00, but I felt that it's a crappy solution.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,584)