Using date functions to automatically advance the date on a form

J

Jch461

I am trying to use a date function with arguements to assign a specific day
to a form. For example, using the =date() function on the form would put in
todays date. I need to know what arguements I would have to put in to
advance the date to a certian day... say like next sunday. The function
should allow the form to be printed with next sunday's date on it no matter
what day it it printed on. Say I printed the form today... it would have
next sunday's date already on it. Also I would like it to advance to the
next sunday as soon as next monday arrives. Thanks in advance! I used to
know how to do this but i simply cannot remember.
 
K

Klatuu

This expression will return the Sunday of the week the date is in. For
Sunday, it will return the current date, for every other day, it returns the
next Sunday date:

dateadd("d",choose(datepart("w",date),0,6,5,4,3,2,1),date)
 

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