hi,
I select my text columns in multi formula, and apply this -
DateTimeParse([_CurrentField_],'%y-%m-%d')
but getting nulls. I want in yyyy-mm-dd format.
How do I fix this?
@wonka1234 What is the date format in your text columns? Are they in the format yyyy-mm-dd?
@binuacs they are in this format: 2-Oct-23
A text field converts to a DATE using the DateTimeParse() and once it is a DATE data type, then the DateTimeFormat() function can be used to put it out to a text field in a wide variety of formats.
Your question appears to be asking how to turn a value of 2023-05-31 into 23-05-31. I would be willing to bet that this is not what you're actually trying to do. You might want to look at: https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm for some guidance.
Cheers,
Mark
@wonka1234 You should use the same date format of your input fields in the DateTimeParse() function
DateTimeParse([_CurrentField_],'%d-%b-%y')
I agree with @binuacs :
%d = Day of the month as two digits, from 01 to 31
- dash
%b = The abbreviated month name (Feb, Oct)
- dash
%y = The two digit year.
Cheers,
Mark