Hi There
In my database I have a string date values as Q1 2014, Q2 2014 etc. Is there a way to convert them to date values so that I can use these for analysis/time series calculations?
Thanks
Veekay
Solved! Go to Solution.
You can convert string dates to an actual date field using the 'datetime' tool, which supports a number of different incoming formats, and where Alteryx hasn't pre-built, in most instances you can use a 'custom' statement to capture your incoming date structure.
However, quarter is not one of those supported.
What I would advise you do is:
Split your field on the space character. This will leave you with two fields, one which is Q1 (quarter) and one that is 2014 (year).
Now you can build out a simple formula tool to develop your date.
[Year]+IF [Quarter] = "Q1" THEN "-01-01" ELSEIF [Quarter] = "Q2" THEN "-04-01" ELSEIF [Quarter] = "Q3" THEN "-07-01" ELSE "-10-01" ENDIF
This worked like a charm!
Thanks Ben