Hey there, How do I extract Month (February) and Year (2019) Separately from February 28, 2019?
Hi
This example should be give you the result you want?
you can use a datetimeparse formula within the formula tool.
datetimeformat(datetimeparse([field],"%B %d, %y"),"%B") would get you the month.
datetimeformat(datetimeparse([field],"%B %d, %y"),"%Y") would get you the year.
Hi,
I tried datetimeformat(datetimeparse([field],"%B %d, %y"),"%B") to get the month but receive an error Invalid month:'05-01' -- expected at least three letters
I just started learning Alteryx and need help
Thank you 🙂
How to convert month from the date e.g. if the date is 02-27-2017 , I need just Feb as a month and not the entire date. Please help.
Thank you,
Dwarkesh
in this situation you'll need to both parse the date from the string as it's a non-standard format, and then format the date accordingly.
something like:
datetimeformat( datetimeparse([field],"%m-%d-%y"), "%b")
would return "Feb" as the result in your example. We are using "datetimeparse" to get the date in a format alteryx can recognize, then the "datetimeformat" function to reformat it in the abbreviated month name.