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
Solved! Go to Solution.
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
Thanks a lot.
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
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.