Hi
I have a table containing year and day number for the given year. I need to create a date using those two inputs. That is easy in Excel, but have not been able to do it in Alteryx.
Anyone that can help me out?
Best Regards
Fredrik
Solved! Go to Solution.
Hi
Thanks for the quick response :)
Unfortunately the table does not contain the month. That is the reason I am struggling with this.
Fredrik
This is actually quite simple using the datetimeadd function; something like...
[Year]+"-01-01"
Will give the base date for the year and then...
DATETIMEADD([Year]+"-01-01",[day],'days')
Will add the number of days in your day column to this base date.
If your [Year] field is numeric then you must wrap it in tostring, like...
DATETIMEADD(tostring([Year])+"-01-01",[day],'days')
Ben
So is the day number absolute? Like it can go up to 365 in a year?
Thanks for the help. This worked really well :)
Best Regards
Fredrik