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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report date help.

Status
Not open for further replies.

HOMMER

Technical User
Apr 12, 2001
112
US

I write the date on my report with this statement from a form. What I need to do is show this information minus 364 days. I can do it in a query but can not doit on my report...



="Previous " & [Forms]![frm_bm_Report]![txtStartDate] & " to " & [Forms]![frm_bm_Report]![txtStopDate]
 
Take a look at the DateSerial function. You can use this function to calculate what you want.

If I get a chance to calculate the exact formula this evening, I will post back.
Tom
 
Sorry, I think the DateAdd function will do it better than the DateSerial function.

In an unbound text box, I plugged the following code...
=DateAdd("d",-364,Date())

This takes the current date and subtracts 364 days.

If you are using something other than the current date, then substitute [your date field] for Date in the formula. In other words...
=DateAdd("d",-364,[your date field])

Hopefully, this will help.
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top