Date/Time Stamp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cheekie
    New Member
    • Sep 2006
    • 5

    Date/Time Stamp

    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?
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    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


    Originally posted by Cheekie
    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?

    Comment

    • rockkyy
      New Member
      • Oct 2006
      • 9

      #3
      Originally posted by mmccarthy
      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,clientda ta etc on a STL map container with the unique token as the KEY and the structure containg userid,clientda ta 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.....

      Comment

      Working...