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 / Format Date/TIme from ...
Power Automate
Answered

Format Date/TIme from utcNow() to Date Only and REMOVE Time?

(1) ShareShare
ReportReport
Posted on by 63

I'm tryin to feed the DATE ONLY into a SharePoint text field, using the utcNow().  I need to EXCLUDE/remove the date, and currently have it formatted as:

 

formatDateTime(utcNow('MM-dd-yyyy'))

 

The date is now fine, but how do I remove the time?

Categories:
I have the same question (0)
  • Verified answer
    RezaDorrani Profile Picture
    12,143 on at

    Hi @staceylaney 

     

    use expression

     

    formatDateTime(utcNow(),'MM-dd-yyyy')

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • staceylaney Profile Picture
    63 on at

    That was SO simple - thank you!

  • Community Power Platform Member Profile Picture
    on at

    Hi Reza, I'm trying to apply this concept to my scenario. Could you guide how to fix this. Basically, I'm creating a file in sharepoint from previous input (Power BI extract). Iam looking to append only Date to this rather than have UTC now. The formula above doesnt seem to work. Could you guide?

     

    Aaronrox_1-1638351759653.png

     

  • Community Power Platform Member Profile Picture
    on at

    It worked for me now.

  • JohnGorena Profile Picture
    79 on at

    or more accurately adjust for your time zone

     

    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'MM/dd/yyyy')

     

    The expression above shows a format like 01/10/2022 for Central Standar Time.

  • ROKSTA1972 Profile Picture
    2 on at

    @RezaDorrani can you convert UTC time to New Zealand Standard Time and then also format the date to "dd,mm,yy" in Power Automate

  • JohnGorena Profile Picture
    79 on at

    formatDateTime(convertFromUtc(utcNow(), 'New Zealand Standard Time' ),'dd,MM,yyyy')

    will produce a format like 24,03,2022

     

     

  • MitheshRpa Profile Picture
    162 on at

    If i use this syntax , i am getting it as text , but not date.

  • JohnGorena Profile Picture
    79 on at

    Write the format that you want or the format that works in a DATE Field..  Put it in a date field and not a text field.  Does that work?

  • JohnGorena Profile Picture
    79 on at

    I posted this somewhere on this forum before but I cannot find it...   Here are examples from my notes....


    01)
    utcNow()
    2022-01-10T20:27:13.9480796Z

    02)
    formatDateTime(utcNow(),'yyyy-MM-dd tH:mm:ss')
    2022-01-10 P20:27:13

    03)
    formatDateTime(utcNow(),'yyyy-MM-dd TH:mm:ss')
    2022-01-10 T20:27:13

    04)
    formatDateTime (addHours(utcNow(), -6),'yyyy-MM-dd (H:mm:ss)')
    2022-01-10 (14:27:13)

    05)
    convertFromUtc(utcNow(), 'Central Standard Time' )
    2022-01-10T14:27:13.9480796

    06)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd (HH:mm:ss)')
    2022-01-10 (14:27:13)

    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyyMMdd')
    20220110

    07)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd , H:mm')
    2022-01-10 , 14:27

    08)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyyMMdd-HHmm')
    20220110-1427

    09)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyyMMdd @HHmm')
    20220110 @1427

    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyyMMdd')
    20220110

    10)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd (H:mm:ss)')
    2022-01-10 (14:27:13)

    11)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd (HHmm)')
    2022-01-10 (1427)

    12)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd (H:mm:ss)')
    2022-01-10 (14:27:13)

    13)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd (HH:mm:ss)')
    2022-01-10 (14:27:13)

    14)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd (hh:mm:ss tt)')
    2022-01-10 (02:27:13 PM)

    15)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd (h:mm:ss tt)')
    2022-01-10 (2:27:13 PM)

    16)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'g')
    1/10/2022 2:27 PM

    17)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'MM-dd-yyyy, h:mm tt')
    01-10-2022, 2:27 PM

    18)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'MM-dd-yyyy, h:mm:ss tt')
    01-10-2022, 2:27:13 PM

    19)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'yyyy-MM-dd, h:mm tt')
    2022-01-10, 2:27 PM

    20)
    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'MM/dd/yyyy')
    01/10/2022

    formatDateTime(convertFromUtc(utcNow(), 'Central Standard Time' ),'MM/dd/yyyy h:mm tt')
    01/10/2022 2:27 PM

     

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard