Need Year Functions

D

dano0097

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

Happy Holidays
-Dan
 
R

R. Hicks

I hope I understand what you are asking ...

To calculate the first day of the previous year based on the current
date ... use:

DateSerial(Year(Date())-1,1,1)

To calculate the last day of the previous year based on the current
date ... use:

DateSerial(Year(Date()),1,0)

But if you are wanting to know the literal day .. incorporate the
WeekDay() function with the above to get this value:

WeekDay(DateSerial(Year(Date())-1,1,1))

And ..

WeekDay(DateSerial(Year(Date()),1,0))

RDH
 

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

Top