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!

Check if Time is within last hour

Status
Not open for further replies.

marcin2k

Programmer
Jan 26, 2005
62
CA
I have a variable datDate which stores a date and time, so its basically in the format of Now(). I want to check that this time is within 1 hour. How can I do this. I read about the DateAdd function but it seems to always give back a huge number when i subtract Now() from datDate.

Thanks for any help,
Marcin
 


Marcin,

How about DateDiff?

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Ya that worked great, do u know by any chance if there is a one liner for changing one data field in a table. Like i know Dlookup looks up what is in a field but I have a table with one Yes/No field and all i have to do is change it to a No. I know i can use RecordSet but trying to think of quicker ways. Thanks
 


Use an UPDATE query.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top