Access Formula For Dates

A

Alba

I need to show on a weekly basis, the number of weeks left in the year. I
don't want to have to enter it, I want Access to calculate it for me and show
it on my report/database each time it is opened. For example , I want to say
there are 34 weeks left in this year. Is there a formula I can usethat will
determine the number of weeks remaining from today's date (whatever it is) to
December 31?
 
J

Jeff Boyce

One way to look at this is that, if you can identify the "week" of the
current date, you can subtract that from 52 to get an idea of how many weeks
are left.

.... or the day-of-year of the current date from 365 ...

.... or the DateDiff() function, measured in "weeks" ...

Check Access HELP for syntax on any of these.

Where are you proposing to do this?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
A

Alba

Thanks all. I found it. I can show it as:

=DateDiff("ww",Now(),#12/31/2010#)

That is good for this year. Is there a way I can show so that it readjusts
for each year?
 
J

Jeff Boyce

Re-read Karl's response. Using the DateSerial() function ensures that it
works for whatever year...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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