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

Alteryx Designer Desktop Discussions

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

Convert Dates

MichaelHarks
5 - Atom

Hello alteryx comunity,

 

I get a timestamp from SAP that looks like this: 9103884200000 the output should look like this: 06.11.2018 23:40:20.

I have already tried many solutions but unfortunately without success :/.

 

BR,

Michael

3 REPLIES 3
Nick-C
Alteryx
Alteryx

Hi @MichaelHarks ,

I've done a bit of research and think I've solved this for you! 

SAP appears to output dates as the number of seconds from 1990-01-01 so we can calculate using that. The other requirement though,  is to divide your date by 10,000 (not sure why but seems to work - https://answers.sap.com/questions/3533599/index.html)

So :
- Create a DateTime field of 1990-01-01 00:00:00
- Divide your date by 10,000

- DateTimeAdd( [TheCreatedDate], [Your Date / 10,000], "Seconds")

I've put a screenshot below, hopefully this helps - if it does please mark this solution as 'Solved' :)

 

I get a different hour result - likely due to timezone, I'm hoping this won't happen for you but if it does you could do another datetimeadd for the hours! 

 

NickC_1-1657874243805.png

 

MichaelHarks
5 - Atom

thanks for the quick help it works

Nick-C
Alteryx
Alteryx

Hi @MichaelHarks 
No problem at all - glad it works! Would you mind marking it as 'solved'? This way other users can find it easily if they run into the same issue! 

Labels