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 II
Dual Super User II

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 II
Dual Super User II

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!

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

 

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,845)