Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to create a single date field in my script data which combines 2 fields together:
Finance_Month (January, February, March, April, May, June, July, August, September, October, November, December)
Finance_Year (2015, 2016, 2017)
I want to combine them to return the following in a date format
April 2015, May 2015, June 2015 July 2015 ........
How do I do this?
Many thanks
Phil
Try like:
Load
Finance_Month & ' ' Finance_Year as MonthYear,
MonthName(Date#(Finance_Month & Finance_Year, 'MMMMYYYY')) as MonthYear2
From <>;
Note: MonthYear2 process is a better approach since this would be a proper date field (numeric underlaying values) while other one is just string.
Edit: correctd
Hi
This returns a text value but not a date field for some reason.
Any thoughts?
Thanks
Phil
Using MonthYear(date#(..)?
=Date(Date#( Year(Date)*100+Month(Date),'YYYYMM'),'MMM YYYY') as the_date
It fails as MonthYear isn't a function in my script
Extremely sorry, use MonthName()