By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

Date/Time Stamp

P: 5
I have an Access table that has a Date/Time stamp. I am only looking for records that are either before 8am or after 10pm....is there anyway to query or break this data out?
Sep 7 '06 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
If you only want to store the time you could use:

Time() would return a value such as '10:42:58 PM'
Using Hour() on a timestamp will return the 24 hour value

Hour (#22/11/2003 10:42:58#) ' would return 22

Therefore something like this should work:

Hour([TimeStampField])>=22 And Hour([TimeStampField])<=8


I have an Access table that has a Date/Time stamp. I am only looking for records that are either before 8am or after 10pm....is there anyway to query or break this data out?
Sep 7 '06 #2

P: 9
If you only want to store the time you could use:

Time() would return a value such as '10:42:58 PM'
Using Hour() on a timestamp will return the 24 hour value

Hour (#22/11/2003 10:42:58#) ' would return 22

Therefore something like this should work:

Hour([TimeStampField])>=22 And Hour([TimeStampField])<=8

hi,

i am storing a random token and userid,clientdata etc on a STL map container with the unique token as the KEY and the structure containg userid,clientdata etc as the VALUE.
Now i want to delete a token-Structure pair every 2 days. How will i know a particular token has expired?
Can i add another value on to the structure containing a time stamp of when it was created? Then after every 2 days some timer will expire which will trigger a check on all the tokens one by one by comparing its time stamp with the current system time. If it is greater than say 48 hrs then delete it.

But i dont know which standard function to use(like time() ). Is there any library function which does timeout... or how to implement a 48 hrs timer. can any suggest how to go about implementing this.....
Oct 27 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.