Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Converting Epoch Time to normal time and keeping decimal precision

nbb623
5 - Atom

Hello all!

 

I am converting Epoch Time to readable time with a DateTimeAdd function and its working except I need it more precise.

 

My original timestamps are in the form of 1681412524.10937 (all those decimal points!) and using the function:

 

DATETIMEADD('1970-01-01 00:00:00', Tonumber([Timestamp]), 'seconds')

 

It obviously loses lots of information going to only seconds, is it possible to retain the decimal points in any way converting out of Epoch time? Thanks !!

 

2 REPLIES 2
FrederikE
13 - Pulsar

Hey @nbb623,

 

You can split out everything after the decimal point using RegEx (.*\.(.*)). And then use your DateTimeFunction afterwards. 

FrederikE_0-1683742626821.png

 

nbb623
5 - Atom

Thanks that seems like it would work! I'm still very new to this program, what would be the optimal way to add the decimal back to the end of the new datetime?

Labels
Top Solution Authors