Hi,
How do I convert string data type in MM-YYYY to date format in Month, YYYY? I have tried to use Datetime tool and DateTimeParse function but it is not working for me. I am either getting a null result or conversion error.
Below is an example of an input data( string data type)
1-2017
2-2017
3-2017
4-2017
5-2017
6-2017
12-2017
Desired output( date data type)
January, 2017
February, 2017
March, 2017
April, 2017
May, 2017
June, 2017
December 2017
I have tried to use the datetime tool using the selection below
But I get this result below, which is not the desired format.
Solved! Go to Solution.
@cokeke
We need to convert the string to a DateTime data, then convert back to String with your desired output.
note that " January, 2017" can not be a Data type, it is a String.
Here is the complete reference, and I always check the syntaxes. 😁
https://help.alteryx.com/20221/designer/datetime-functions
how can we convert this other way around. Jan,2017 to 01/01/2017