I have two columns of data with date information - one Double, with year, and another Double, with Month
I have created another column with Month in String format so I have that as well
I've been able to create a combined String column by converting the Year into String and using the expression [Month]+"-"+[String Year]
I cannot figure out how to convert this to a date field using the DateTimeParse formula
Is there another combination of double/string values I should be using? What other conversions do I need to do?
I've read every help page of time/date to no avail!
Thanks!
Solved! Go to Solution.
One more issue now (corrected the % positioning!)
Now, only some of the dates convert and others do not... Why is this?
Did you change to a capital 'B'?
YES thank you!!!! I should have posted here first before wrestling with the formulations.
Hello ,
I am facing a similar problem in alteryx. I have a String field in the format 082009 which is the month and year of payment. I am trying to convert this into a date format. I am using the formula as below but I get a null field as a result with conversion errors.
DateTimeParse([Payment_Date],'%m, %Y')
It needs to have a "day" in order to assign the full date.
Try something like...
DateTimeParse('01' + [Payment_Date], "%d%m%Y")
...which will default it to the first day of the month.
I have read the existing posts and tried everything I could think of but failed so far. Please help.
My date string looks like "JAN 2017". I tried DateTimeParse([MyDateString], "%m %Y") but get an error.
The error message reads, 'Month number is out of range 1..12'.
If you are attempting to format this into a numbered date, you will want to use DateTimeParse([MyDateString],"%B %Y"). The result will be 2017.01.01. You can find all of the date function here for reference under the Specifiers section https://help.alteryx.com/2018.1/index.htm#Reference/DateTimeFunctions.htm
Thank you, DanM.
Yes, I am trying to format it into Date. I tried what you suggested but I still get the same error. I don't understand what is wrong.....
I will keep on trying. Thanks again.
Hi RodL,
I have a date 201909, need to convert to 30/09/2019, how can I do it?
thanks
Jana