web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / utcNow() specific time
Power Automate
Suggested Answer

utcNow() specific time

(0) ShareShare
ReportReport
Posted on by 58
Compose-DateTime utcNow()
Compose-Add 1 Day addDays(outputs('Compose-DateTime'),1)

Then i do Create Item to add these items to the SharePointList and the results are:
 
Results are (Compose-Add 1 Day): 12/6/2024 12:37 PM i would like the result to be 12/6/2024 10:00 AM. in other words take Compose-DateTime and add 1 day and want the time to be 10:00 AM. hope fully that makes sense. if i use formatdatetime and post to SharePoint list it screws date and time up.
 
Thank You
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    Can you change the expression of the second Compose to the below and try again?

    addDays(outputs('Compose-DateTime'),1, 'yyyy-MM-ddT10:00:00Z')


  • JR-15101929-0 Profile Picture
    58 on at
    result is 2024-12-06T10:00:00Z but in SharePointList it is 12/6/2024 5:00 AM and not 12/6/2024 10:00 AM as desired.
  • Suggested answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    The Z at the end denotes that this time is for UTC time zone, which is 5 hours earlier in Eastern.  In Power Automate you need to input the time in ISO 8601 UTC format. So make sure you convert your eastern time entry to UTC before you input it to SharePoint using Power Automate.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • JR-15101929-0 Profile Picture
    58 on at
    i dont understand. if and when i use the datetimeformat is becomes a string and then SharePointList isn't interpreting correctly, right? Can you give me syntax? Thanks Paul i appreciate you.
     
  • Suggested answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    The Z at the end of the Time you are inputting designates that the time is for UTC, Greenwich mean time. So 10 AM is actually 5 am Eastern time. So if you want 10 AM Eastern time you need to add 5 hours to the time you are calculating.  That would make it 2024-12-06T15:00:00Z. When you look at that time in SharePoint on your site set for Eastern time zone it will show up as 10:00 AM

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    Thanks for the help 👍
     
    Sometimes I forgot about dealing with time zones. This is because I live in the UK and UTC/GMT in most use cases doesn't need conversion for us 😅
  • JR-15101929-0 Profile Picture
    58 on at
    the original time is dynamic so adding 5 hours, the times can change. what i am looking to do is add 1 day and have it at 10:00 AM.  i create the Event in Outlook and it works fine 
    formatDateTime(outputs('Compose-Add_1_Day'), 'MM-dd-yyyy') 10:00 but in SharePointList that doesnt fly

    also this website is constantly logging me off, post no going through, locking up, occasional error message... is it me or is there something with this site?
  • Suggested answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    Its not you. I'm having the same problem today.  If you want the entry to be at 10:00AM eastern time then change your current function to
     
    formatDateTime(outputs('Compose-Add_1_Day'), 'yyyy-MM-ddT15:00:000Z')
     
    Hard coding the time in the format string will overwrite the current time with 15:00 which will be 10:00 AM Eastern time. make sure to also change the format to have Year first, which is Iso 8601 compliant.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
     
  • e.evseychik Profile Picture
    42 on at
     
    @Pstork1 in general answered your question but I would clarify the issue a bit deeper. Whatever date and time is passed to SharePoint, the latter takes it in the UTC time zone. Then it is displayed for users according to the time zone settings of your site (or of their accounts - take this opportunity in mind too). Check Site settings > Regional settings > Time zone. Most likely, you will see this:
     
     
    It means that before displaying time, SharePoint subtracts five hours and only then shows a result. If you change your time zone settings, the displayed time will change too though the value in the date and time column does not. When updating or creating a SharePoint list item, you need to do an opposite action: if your time zone is UTC-5, add five hours to the desired time. If your time zone is UTC+3, subtract three hours from the desired time. In your case, pass this value:
     
    2024-12-06T15:00:00Z
     
    You can do it right in the SharePoint action without using composing steps - just nest one expression into another. The date and time format can be defined in the addDays() expression.
    ​
    addDays(utcNow(), 1, 'yyyy-MM-ddT15:00:00Z')
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard