Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have year format as 5024 ,5048,5049.I need to convert it as 'YYYY'.
Try this:
Year(Date(AddYears(Date(Date#('19' & Right(FCFSDT,6),'YYYYMMDD'), 'DD/MM/YYYY'), 100 * Left(FCFSDT,1)), 'M/D/YYYY')) as Year
Maybe a bit simpler:
...Year(Date#(19000000+FCFSDT, 'YYYYMMDD')) AS Year, ...