cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
staceylaney
Advocate II
Advocate II

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

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?

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User
Dual Super User

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

View solution in original post

7 REPLIES 7
RezaDorrani
Dual Super User
Dual Super User

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

That was SO simple - thank you!

Anonymous
Not applicable

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

 

Anonymous
Not applicable

It worked for me now.

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.

@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
Advocate I
Advocate I

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

will produce a format like 24,03,2022

 

 

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 (2,474)