Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Inputs
Month: Apr
Year: 2015
Desired output: 201504
Current syntax:
Num(Year & num(month(date#(Month,'MMM'))), '000000') as [Fiscal Period]
Current output: 020154
I'm very close but I cant seem to figure out where I am going wrong.
Any help is appreciated.
- dave
Try this:
Date(MakeDate(Year, Month(Date#(Month, 'MMM')), 1), 'YYYYMM') as [Fiscal Period]
or
Date(Date#(Year & '-' & Month, 'YYYY-MMM'), 'YYYYMM') as [Fiscal Period]
Try this:
Date(MakeDate(Year, Month(Date#(Month, 'MMM')), 1), 'YYYYMM') as [Fiscal Period]
or
Date(Date#(Year & '-' & Month, 'YYYY-MMM'), 'YYYYMM') as [Fiscal Period]
Try
Year & num(month(date#(Month,'MMM')), '00') as [Fiscal Period]
or
Date( Date#( Year & Month,'YYYYMMM'), 'YYYYMM') as [Fiscal Period]
note that the underlying numeric value is differenct in the second approach (it's the monthstart date value)
Amazing. Thank you per usual.
Not a problem
try
Date(Date#(Year & Month, 'YYYYMMM'), 'YYYYMM') as .......