Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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
15 - Aurora

@vkarthi8 is the date in format or in double?

aatalai
15 - Aurora

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
15 - Aurora

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

 

Labels
Top Solution Authors