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

Same Program, Different Problem Access 97 SQL Date Issues 1

Status
Not open for further replies.

spoon1

Technical User
Apr 28, 2003
37
US
Hi Guys, I should have quit while I was ahead, but I had to try to improve the date deal on my database, the manual inputs are killing my carpal-tunnel ridden wrists, so thanx for any help you can give me.
(PROGRAM USED IS ACCESS 97 SR-2)
On a form I have a text box that takes input for a date that a package arrived. On the same form, there is a text box that takes input for a date that the package is scheduled to leave. I have formatted both of these text boxes as "short date" on the form and the corresponding table.
***********************************
I need 3 outputs that should pivot from the known date data (obviously). One output is; will the package be here 1 day from now? 2nd output; will the package be here 2 days from now? and finally; will the package be here 5 days from now?
************************************
Some things I have tried:
I have read about date add- syntax problems make me unsure. Also, I dont know how to flag the date if it goes OVER the day it's supposed to leave... do you see my dilema?
I try not to bug you guys unless I have spent several hours trying to fix it myself, and I have- so please help me out if you can.
 
To add 1 day to the current day:

DateAdd ("d", DateField, 1)

Replace the 1 with the number of days you want to add.
The "d" represents the time period. d = day, m = month, y = year

Advantage of doing it this way is it gets around the calendar problems of different no. of days in months etc.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top