Function for default value of a date field

S

scottchampion

I have date field and would like to set its default value to be 6
months prior to today.

It appears that the only date functions which I am able to use for a
default value are now() and today(). Is it possible to modify the
results from the today function such that it returns a date 6 months
prior to today?
 
S

S.Y.M. Wong-A-Ton

While it is possible, you will get into trouble when your calculated date
falls in February or in a month that has 30 days instead of 31.

It is best to write code to perform such date calculations. Search this
newsgroup on "add days" to find posts on how this can be done.
 

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