cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Convert utcNow('MM/dd/yyyy HH:mm') to integer

Hi everyone, 

 

I'm still learning expressions and I was wondering if there's one that you could help me with to convert  

utcNow('MM/dd/yyyy HH:mm')  to a whole integer number. 
 
so if my input is 10/30/2020 17:13, my output would be 103020201713
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

With this expression:

 

int(replace(replace(replace(utcNow('MM/dd/yyyy HH:mm' )  , ':', ''), '/', ''), ' ', ''))

 

dateToInt.PNG 

 

If I answered your question Accept it as a solution ✔️ 

If I helped you out, please give me some Kudos 👍

Thanks 😙

View solution in original post

Highlighted

I believe

 

formatdateTime(utcNow(),'MMddyyyyHHmm')
 
is much easier and faster.

View solution in original post

6 REPLIES 6
Highlighted
Impactful Individual
Impactful Individual
Highlighted
Memorable Member
Memorable Member

With this expression:

 

int(replace(replace(replace(utcNow('MM/dd/yyyy HH:mm' )  , ':', ''), '/', ''), ' ', ''))

 

dateToInt.PNG 

 

If I answered your question Accept it as a solution ✔️ 

If I helped you out, please give me some Kudos 👍

Thanks 😙

View solution in original post

Highlighted

@VictorIvanidze  thank you but that seems to talk about time formats and their customizations and not how to convert them.  

Highlighted

@F_Quint, there exists a neat function formatDateTime.  Is this about time formats in your opinion? 

Highlighted

@Paulie78  Thank so much. That's exactly it. 

 

Now onto learn more about expressions!

Highlighted

I believe

 

formatdateTime(utcNow(),'MMddyyyyHHmm')
 
is much easier and faster.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,510)