cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

CONVERT DATE ISO 8601

Hey guys, I need to filter a gallery by date, but on the collection, the date comes like this: 

 

1582097400000 

 

 There is a possibility to convert and make a filter my gallery by date? And I need to make a default filter date + 7 days forward.

 

The name of the column:  DatadeIníciodaTarefa

 

Thanks for the help guys!

15 REPLIES 15
Dual Super User III
Dual Super User III

I believe what you have is the number expressed in Ticks.  Ticks in this case being the number of seconds after midnight on 01/01/1970.  So you can use the following formula to convert a regular date field to a similar number and use that for sorting

DateDiff(DateTimeValue("01/01/1970 00:00:00"), DateFieldToConvert, Seconds)

Or you can convert the Ticks back to a date using this formula

DateAdd(DateTimeValue("01/01/1970 00:00:00"),NumberOfTicks,Seconds)

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Super User III
Super User III

@Gorilla_8 

Please provide instructions for how to convert this number into a date.

1582097400000

 

Also let the forum know what date this number translates to?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

Well... at least @Pstork1 understands what that crazy number means 😁

@mdevaney I don't have a clue about how to convert this number to a date 😞 

 

I need help with this...

@Gorilla_8 

...did you try the suggestion of @Pstork1?

@Pstork1 

 

Where?

Dual Super User III
Dual Super User III

First, since the number is measured in Ticks, the number of seconds after midnight on 01/01/1970. you can just sort based on that numeric field. Larger numbers are later and smaller numbers are earlier. 

 

For the range calculation. Add or subtract the number of seconds in the time period you want to use.  7 days would be 7 * 24 hours * 60 minutes * 60 seconds.  That comes to 604,800 seconds.

 

to convert back into a date use the formula I provided in my previous reply.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 Thanks for the reply!

But unfortunately, I can't find the reply post you are mentioning...

 

Sorry about that 😞

Dual Super User III
Dual Super User III

It was the first reply on this post.

 

I believe what you have is the number expressed in Ticks.  Ticks in this case being the number of seconds after midnight on 01/01/1970.  So you can use the following formula to convert a regular date field to a similar number and use that for sorting

DateDiff(DateTimeValue("01/01/1970 00:00:00"), DateFieldToConvert, Seconds)

Or you can convert the Ticks back to a date using this formula

DateAdd(DateTimeValue("01/01/1970 00:00:00"),NumberOfTicks,Seconds)

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (18,581)