I want to convert the submit date 06/22/2022 11:42 in the csv file to 22-JUN-22 in string format. Can anyone please help?
I want to convert the date 06/22/2022 11:42 in the csv file to 22-JUN-22 in string format. Can anyone please help?
Solved! Go to Solution.
Hey @srk0609,
The most understandable way to do this is with two datetime tools:
The first creates a date type column "DateTime_Out" the second converts that date to your format as a string.
Any questions or issues please ask :)
HTH!
Ira
@srk0609 Or you can use one formula tool with using the date time functions:
DateTimeFormat(DateTimeParse([Field1],"%m/%d/%Y"),"%d-%h-%y")
One option:
Uppercase(DateTimeFormat(DateTimeParse([Input],'%m/%d/%Y %H:%M'),'%d-%b-%y'))
Hi @srk0609
@IraWatt 's solution is definitely the understandable way to do it if you're new to date functions. Here's a way to do it in a formula tool. This also allows you to get the month in uppercase like your example:
Uppercase(DateTimeFormat(DateTimeParse([Field1],'%m/%d/%Y'),'%d-%b-%Y'))
This page has all the info you'll need on date time functions: DateTime Functions | Alteryx Help
Thank you, Ira