cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Svenny
Advocate III
Advocate III

Convert tick to date value

Hello!

 

I am sure someone will have a simple answer to this. I am tryick to convert a tick() integer value back to a date in format 'yyyy-MM-dd'. I am trying to do this using the addseconds formula, and using '1601-01-01' as my start date. However, I am getting the wrong output date.

 

My attempt: 

 

addSeconds('1601-01-01', div(outputs('Ticks')/1000000000)), 'yyyy-MM-dd')
 
Probably my formula to get seconds from the tick is wrong. Anyone have a quick answer to this? 🙂
 
Sincerely
Svenny
1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Svenny,

 

The div() function should have two parameters and separated by ",".

It seems like you want to convert the ticks into second, the divisor should be 10000000, not 1000000000.

So the final correct expression should be:

addSeconds('1601-01-01', div(outputs('Ticks'),10000000), 'yyyy-MM-dd')

 

Best Regards,
Community Support Team _ Lin Tu
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

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @Svenny,

 

The div() function should have two parameters and separated by ",".

It seems like you want to convert the ticks into second, the divisor should be 10000000, not 1000000000.

So the final correct expression should be:

addSeconds('1601-01-01', div(outputs('Ticks'),10000000), 'yyyy-MM-dd')

 

Best Regards,
Community Support Team _ Lin Tu
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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,524)