Alteryx Designer Desktop Discussions

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

Date Time Format

727
7 - Meteor

Hi all,

 

One of the date fields from my excel input appears as decimals (e.g. 44258.469444444). How do I convert this to MM/DD/YYYY? TIA

3 REPLIES 3
Luke_C
17 - Castor

Hi @727 

 

You can use the attached as an example on how to do this. 

 

  1. I take the 'floor' of the value, which rounds down and just gets the whole number. The decimals here represent time which is not needed based on your post.
  2. The excel number represents number of days since 1900. You can use the datetimeadd function to add that number to 1/1/1900. We need to subtract 2 here due to some nuances with leap years and how the date functionality works. 

 

Hope this helps!

 

 

Luke_C_0-1618248744688.png

 

Qiu
20 - Arcturus
20 - Arcturus

@727 

ToDateTimeFunction is for the calculation of Excel DateTime format.

Capture1B.PNG

Luke_C
17 - Castor

@Qiu  - much simpler!

Labels