Results 1 to 2 of 2
  1. #1
    kbsudhir is offline Novice
    Windows Vista Access 2003
    Join Date
    Apr 2009
    Posts
    10

    Question Time Query

    Hi All,

    I am using Access 2003. I have a table with "DateTime" Field.

    This field captures the received date n Time for teh incoming mails in by outlook in the belwo format:

    "6/29/2009 3:30:12 PM".



    Now I want to create a query to pull the deadline from this column. It pull those records which have date of today & time is for after "4Hrs"

    Ex. if its 4:00AM in then it pull data for todays date till the time is "<=8:00AM".

    Please guide.

    Any assitance is appreciated.

    Regards


  2. #2
    kevsparky is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    4
    Access stores dates as whole numbers and times as fractions of a day. See here for details http://support.microsoft.com/kb/210276.

    If you want to get a time 4hrs in the future, you can use DateTime + (4/24) this is 4 hours as a fraction of a day.

    If you want to get 8AM on a certain day, use Int(DateTime) + (8/24) the Int function just returns the integer part of a variable.

    Or you can google "Access DateDiff()" or "Access DateAdd()" functions for syntax and info.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums