|
|
Question : convert date(text) to Fiscal year and fiscal year period.
|
|
i have a text data type field in MS Access as 2005-08-26(actually it represents date). i want to have FY field and FYPD field in Access based on that text field which is actually a date. my condition is like this: FY field should have data as last two digit of 2005 i.e. 05 and the first period should start from october. that means 08(which is month here) should return 11 as FYPD. 10(0ct)=1(FYPD) 11(Nov) = 2(FYPD)..and so on.
|
Answer : convert date(text) to Fiscal year and fiscal year period.
|
|
select format(DATEADD("m", -3,CDATE(YOURDATEFIELD)), "MM") as fypd, format(DATEADD("m", -3,CDATE(YOURDATEFIELD)), "yy") as FY from yourtable
|
|
|
|
|