Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Converting a double to date with missing monthly & daily zeroes

Tonia_Dykes
6 - Meteoroid

I am trying to convert a double that is missing leading zeroes on the months and days: 7-digits only

 

current

9152021

1202020

1272021

1262021

 

Desired Results

09/15/2021

01/20/2020

01/27/2020

12/06/2021

 

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@Tonia_Dykes ,

 

How about trying this:  convert to string, parse the data and then format it as your string.

 

DateTimeFormat(DateTimeParse(ToString[Current Double Date]),"%d%m%Y"),"%m/%d/%Y")

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
mceleavey
17 - Castor
17 - Castor

Hi @Tonia_Dykes ,

 

I don't see how this can actually work as you have no way of defining which section is missing the leading the zero.

For example, in your date 1262021, should that be 12/06/2021 or 01/26/2021? What is the logic to determine the correct one?



Bulien

Tonia_Dykes
6 - Meteoroid

you are 100% correct - I have gone back to request they at least provide me 8 digits. We will see if that can export that way.

 

Thanks!

 

Tonia

Labels