Days left in a year

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,
I'd like to display, in a form, # of days left to year end, using today's
date as a referance.
TIA
Mike
 
DatePart("y", Date) will tell you what day of the year it is.

DatePart("y", DateSerial(Year(Date), 12, 31)) will tell you how may days
there are in the current year.

Therefore, you can use, as a control source for your textbox,

=DatePart("y", DateSerial(Year(Date), 12, 31)) - DatePart("y", Date)
 
Mike said:
Hi,
I'd like to display, in a form, # of days left to year end, using
today's date as a referance.
TIA
Mike

DateDiff("d", Date(), DateSerial(Year(Date()), 13, 0))
 
Hi,
I'd like to display, in a form, # of days left to year end, using today's
date as a referance.
TIA
Mike

Set the Control Source of a textbox to

=DateDiff("d", Date(), DateSerial(Year(Date()) + 1, 1, 1))


John W. Vinson[MVP]
 

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