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
Helper I
Helper I

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

will produce a format like 24,03,2022

 

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,120)