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

  • Thread starter Thread starter Dave Gibson
  • Start date Start date
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top