Results 1 to 4 of 4
  1. #1
    Join Date
    May 2012
    Posts
    89

    Unanswered: Query: Not Like <#23:00:00#

    Hi i want a query to show only records with the above 23:00 PM but when i use: Query: Not Like <#23:00:00# i just get all the times + the times below 23:00:00.

    Can some one plz tell me why this is, and how to resolve it???

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try using:
    Code:
    WHERE Hour([Column Name]) < 23
    With [Column Name] being the name of the column (field) that contains a Date/Time value.
    Have a nice day!

  3. #3
    Join Date
    May 2012
    Posts
    89
    Hi Sinndho.
    Thx for your quick response.
    In total i have the code below:

    SELECT [rapportage scr sub].datum, [rapportage scr sub].tijd, [rapportage scr sub].operator, [rapportage scr sub].onderwerp, [rapportage scr sub].shopnaam, [rapportage scr sub].memo
    FROM [rapportage scr sub]
    WHERE Hour([tijd]) <23
    ORDER BY [rapportage scr sub].datum DESC , [rapportage scr sub].tijd DESC;

    But i still get the records from the whole day.
    Also the records with other time below 23:00 hour.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    1. Is [tijd] defined as of Date/Time data type?

    2. Did I miss something? If you use the condition:
    Code:
    WHERE Hour([tijd]) <23
    it seem normal that the query returns:
    records with other time below 23:00 hour.
    Have a nice day!

Posting Permissions

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