cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
EXTENDED Deadline - August 30th | You still have time to submit your Alteryx Use Case to qualify for this round of Analytics Excellence Awards presented at Inspire Europe 2018! Learn more here.

Date conversion

Hi, I've been looking through the forums but haven't quite figured out my date conversion problem.

 

The date format I have is: 12/30/2017 17:29:42:123

The date format I would like is 20171230

 

I have tried a few different formulas but when I get to actually converting the date format I get a conversion error saying the date is not valid.

 

I have tried trimming the left 10 digits but due to some dates being 1/5/2017 they come out with a 0 at the end.

 

Thank you for any help.

 

Bolide

Hi,

 

DateTimeFormat(DateTimeParse([Date],"%m/%d/%y"),"%Y%m%d") should work ...

 

Cheers,

Iain

Highlighted
Bolide

See attached.

 

Iain2018-03-11_16-13-11.png

Alteryx Certified Partner

Hey @Rrmbinson10

 

Try this formula:

 

DateTimeFormat(DateTimeParse(Left([Date],Length(Date)-4),"%m/%d/%Y %H:%M:%S"),"%Y%m%d")

Use this guide for dateformats: https://help.alteryx.com/9.5/Reference/DateTimeFunctions.htm

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

Labels