Results 1 to 4 of 4

Thread: Time syntax

  1. #1
    Join Date
    Jul 2005
    Posts
    39

    Unanswered: Time syntax

    I am trying to query a field in a table where the time ( i.e 3:00 PM) matches the current time.

    sample:

    select clientNo, ClientTime
    from timeMachine
    where ClientTime = #Time#;

    I am not sure of the proper syntax.

    Any suggestions?
    ================================
    RAM disk is *not* an installation procedure
    ================================

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    there is no "time" datatype in Access, you only get datetime, which is not restricted to hours and minutes.

    You may have to extract the "time" portion of your datetime field in order to do your comparison.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Or store the time portion in a string field, then you can query it..
    PHP Code:
    SELECT clientNostrClientTime
       FROM timeMachine
       WHERE strClientTime 
    "03:00" 

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    seems a strange thing to want to do!
    are you sure you are heading in the right direction?

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •