General Discussions

Discuss any topics that are not product-specific here.

DateTime in Formula tool

angelabigham
5 - Atom

How to transform the sales date (44075) to the standard date format (2020-09-01) using the DateTime functions in the Formula tool.

1 REPLY 1
mbarone
16 - Nebula
16 - Nebula

Hi @angelabigham ,

The format that's incoming is a "serial" date.  There are lots of posts in the community about converting serial dates to yyyy-mm-dd format; here's a few (always good to read up on all things "dates" since they are so often a stumbling point in most software packages):

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Convert-serial-date-to-date-in-quot-yy...

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Convert-excel-numeric-date-to-date-for...

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-convert-the-Excel-numerical-dat...

 

However, the short story is that Alteryx can do the conversion for you if you create a new filed using the ToDate() function on your incoming field (just make sure to set the data type to Date in the new field).  And you'll have to first change the incoming number to an actual number (since it's a text file, it'll read in as a string field).  So you'll want to wrap a ToNumber() function around the incoming field before using the ToDate wrapper.

 

Labels