Need the Year Functions

  • Thread starter Thread starter dano0097
  • Start date Start date
D

dano0097

I have all of the functions for inserting the first day of the previou
month (DateSerial(Year(Date()), Month(Date())-1,1)) and last day o
previous month (DateSerial(Year(Date()), Month(Date()),0)) . Are ther
any functions like those for the year? like first day of previous yea
and last day of previous year? if there are and i can get them , tha
would just make my day! thanks!

Happy Holidays
-Da
 
The only reason you need special formulae to get the first and last day of
the previous month is because you don't know what the current month is.
Since you know that the first month of the year is January, and the last
month of the year is December, you can simply hard-code the days.

First day of previous year would be DateSerial(Year(Date()) - 1, 1, 1),
while last day would be DateSerial(Year(Date()) - 1, 12, 31)
 
Back
Top