Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Convert Date Format to Double data type

vkarthi8
7 - Meteor

How to convert Date format in yyyy-mm-dd to yyymm in Double data type format?

4 REPLIES 4
aatalai
14 - Magnetar

@vkarthi8 is the date in format or in double?

aatalai
14 - Magnetar

do you mean that you want it to go from yyyy-mm-dd as date to YYYYMM as just a string of numbers?

 

If so try this in the formula tool with the following formulas

 

a) replace(tostring( [field]),"-","") set this to be string

 

b) tonumber( left([new field],6)) set this to be number output

 

You can combine this all into one with

 

tonumber( left(replace(tostring( [field]),"-",""),6)) setting output to number 

 

vkarthi8
7 - Meteor

Thank you.. This formulae worked " tonumber( left(replace(tostring( [field]),"-",""),6)) setting output to number "

aatalai
14 - Magnetar

@vkarthi8 great can you mark the post as the solution please?

 

Labels