Skip to main content

Notifications

Power Automate - General Discussion
Answered

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

(0) ShareShare
ReportReport
Posted on by

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 (Highlight to read)
concat(formatDateTime(addDays(utcnow(),1),'dd-MM-yy'), ' ', '10')
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 (Highlight to read)
2022-09-22T10:00:00.5436463Z
2022-09-22T10:00:00.5436463Z

 

 
  • Verified answer
    Re: How to get tomorrow's date at a specific time, based on current date?

    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.

     
  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: How to get tomorrow's date at a specific time, based on current date?

    @Anonymous 

    Check this previous post.

    https://powerusers.microsoft.com/t5/General-Power-Automate/PM-to-AM-time-conversion-in-Power-Automate/td-p/908944

    Similar to your case.

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

    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

     

     

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

    Hi @Anonymous ,

     

    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

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

    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 (Highlight to read)
    convertTimeZone((formatDateTime(addDays(utcnow(),1),'yyyy-MM-ddT22:00:00.0000000Z')),'UTC','New Zealand Standard Time')
    convertTimeZone((formatDateTime(addDays(utcnow(),1),'yyyy-MM-ddT22:00:00.0000000Z')),'UTC','New Zealand Standard Time')
  • Re: How to get tomorrow's date at a specific time, based on current date?

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

     

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

    Thanks for your help!

     
  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: How to get tomorrow's date at a specific time, based on current date?

    Instead of concatenating there

    Use this

     

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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard