Function For Last Day/First Day Of Previous/Next Year ??

D

Dave Gibson

Hi,

Would anyone be able to let me know if there is some function or
multiple functions that will allow me to obtain the serial dates of
the last day of the previous year and the first day of the next year
based on a date field called [CurrentYear]

I wish to use the function/formula in the query grid rather than VB or
SQL.


Thanks
 
M

Marshall Barton

Dave said:
Would anyone be able to let me know if there is some function or
multiple functions that will allow me to obtain the serial dates of
the last day of the previous year and the first day of the next year
based on a date field called [CurrentYear]

I wish to use the function/formula in the query grid rather than VB or
SQL.


Doesn't matter where you want to use it. (Besides, what you
specify in a query's design grid is translated to SQL before
it can be used.)

Last date of previous year:
DateSerial(Year(CurrentYear) - 1, 12, 31)

First date in next year:
DateSerial(Year(CurrentYear) + 1, 1, 1)
 
Top