In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Convert date format to weekday

architgharat
5 - Atom

Hi All,

 

I was trying to convert the date type date to weekday and have used the following formula for that attached file-

 

DateTimeformat(DateTimeParse([Date of Ticket Purchase],'%m/%d/%Y'),'%A')

 

But it results out to few null output. Can anyone please help here. I have also attached the output received.

 

Thanks,

Archit Gharat

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @architgharat ,

 

Your date is in a different format, dd/mm/yy.

So you need to use DateTimeformat(DateTimeParse([Date of Ticket Purchase],'%d/%m/%Y'),'%A')

 

Best,

Fernando Vizcaino

architgharat
5 - Atom

Thanks a lot.

Patkei
5 - Atom

Hello,

 

Which format should we use if we also have seconds?

Would that be:

 

DateTimeformat(DateTimeParse([Date of Ticket Purchase],'%d/%m/%Y'%S),'%A')

I couldn't find the indication here: https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm

 

Thanks!!!

 

Pat

fmvizcaino
17 - Castor
17 - Castor

Hi @Patkei ,

 

What is the exact format of your date column?

Here is the current link for datetime function: https://help.alteryx.com/current/designer/datetime-functions

 

DateTimeParse([Date of Ticket Purchase],'%d/%m/%Y %S'

It would be like this if you have day/month/year seconds

 

If you have hours:minutes:seconds, it would be like this

DateTimeParse([Date of Ticket Purchase],'%d/%m/%Y %H:%M:%S'

 

The datetimeformat part is used only if you want to get the weekday information of your date.

 

Best,

Fernando V.

Labels
Top Solution Authors