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.
SOLVED

Convert Date to an Unix format

AndrewCrayford
8 - Asteroid

 

How do I convert a date to an Unix format in Alteryx? For example if i have a date of 17.10.2017 16:19.21 how can i convert that to a Unix date?

1 REPLY 1
JoeS
Alteryx Alumni (Retired)

The first step will be to convert the field with the date in date field type.

 

Once you now have a date format you can use the DateTimeDiff field and calculate the seconds since 1st January 1970.

 

To do this in one expression using your above format it will look something like:

 

DateTimeDiff(DateTimeParse([DateField],"%d.%m.%Y %H:%M.%S"),"1970-01-01","seconds")

I hope that helps

Labels