ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
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