Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

6 mos from a date 1

Status
Not open for further replies.

sopomeres

MIS
Jan 16, 2003
61
US
How can I set up a formula to provide me with a date that is 6 months from a given date.

ex:

1/2/04 --- 7/2/04
6/22/04 --- 12/22/04

Thanks.
Chuck
 
On top of my mind is the following

write a formula

@DAdd6

numbervar mo := Month ({Yourdate})+6;
numbervar da := Day ({Yourdate});
numbervar yr := year ({Yourdate});
datevar dt := date (yr,mo,da);

and include the formula in the design viewer.

Thanks,
MK
 
Hi, I did not figure out the following formula myself, but was given the info by app software support person. This forumula calculates 6 months back from a date, but could be easily changed to plus 6 months, and just change the name of the date field.

To see what the date is 6 MONTHS ago (not 180 days ago) from the animal's dob:

(Date(DateAdd("m", -6, Date(Year({animal.dob}), Month({animal.dob}), Day({animal.dob})))))

Harriet in Ottawa
 
use the DateAdd() function.

i.e.

DateAdd('m',6,{YourDate})

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top