Alteryx Designer Desktop Discussions

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

converting number to date time

KNiranjan
7 - Meteor

HI All,

 

how to convert number to date time field in alteryx. below formula is not working for me. Please suggest. 

 

DateTimeAdd(DateTimeAdd("1899-12-30 00:00:00",TODATE(Field),"days"),86400*TODATETIME([Field]),"seconds")

Field 
44378.0024
44378.00286
44378.00317
44378.00324
44378.00348
44378.0038
44378.00385
44378.00396
9 REPLIES 9
atcodedog05
22 - Nova
22 - Nova

Hi @KNiranjan 

 

Just use ToDateTime() function

 

Workflow:

atcodedog05_0-1629899704402.png

 

Hope this helps : )

 

KNiranjan
7 - Meteor

@atcodedog05 Thanks for your reply, It is dynamic field

when i tried with same i got the blank information

atcodedog05
22 - Nova
22 - Nova

Hi @KNiranjan 

 

Can you provide more info on what do you mean by its dynamic field?

KNiranjan
7 - Meteor

@atcodedog05 when i tried same formula it is not working for me. 

atcodedog05
22 - Nova
22 - Nova

Hi @KNiranjan 

 

Can you try this

ToDateTime(ToNumber([Field ]))

 

Can you please share a snapshot of the issue you are facing.

KNiranjan
7 - Meteor

@atcodedog05 Sorry for my later reply, Here is the error messageCapture.PNG 

atcodedog05
22 - Nova
22 - Nova

Hi @KNiranjan 

 

Did you try running the workflow once remove new1 formula and try running it once.

KNiranjan
7 - Meteor

@atcodedog05 Yes i tried after removing the New1, but still im getting blank data. 

atcodedog05
22 - Nova
22 - Nova

Hi @KNiranjan 

 

The possibility is there might be leading/trailing spaces can you try this formula

 

ToDateTime(ToNumber(Trim([Field]," ")))

 

If this doesn't work can please share me the sample data in files.

Labels