Hi,
I have been working with a dataset of daily sales orders. I have found a way to aggregate those daily orders into monthly figures (i have done in 2 steps - both using Summarize functions: first grouping multiple orders each day into daily totals by grouping by OrderDate and then applying the same approach to aggregate daily totals and grouping them by month_year).
Problem is that to get to the 2nd Summarize, I had to convert datetime format of YYYY-mm-dd (e.g. 2015-01-31) into string format of MM, YYYY (e.g. January, 2015).
Now, to do time series forecasting, I need to convert this MM, YYYY strings back into datetime dtype.
I'm struggling to this since when I try to use DateTime Parse function, it converts back to YYYY-mm-dd (e.g. 2016-03-20)
I need to get rid of days in datetime, and only to keep months and years (e.g. February 2021).
So 2 ways I hope you can help with are:
1. how to convert string in the format MM, YYYY (January, 2015) into datetime format MM YYYY (January 2015)?
or
2. how convert datetime format YYYY-mm-dd (2015-01-31) into datetime with only months and years MM YYYY (January 2015) or mm/YYYY (01/2015)?
i have tried to do this with function DateTimeFormat(DateTimeParse([Month_Year], '%B,%y'), '%B-%Y') - I'm getting
"ConvError: Formula (56): MonthOfYear: January-20 is not a valid Date"
I have also tried conversion with DateTime Parse from string to datetime but I keep getting days back (so YYYY-mm-dd - e.g. 2020-01-26).
Why Alteryx doesn't expand Datetime Parse function to convert from one datetime format to another datetime format?
Please help,
Thx.