Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Posts
    25

    Unanswered: How to search by Date in Informix SQL?

    How do I search by a specific date in Informix? I tried the following, but I'm missing something.

    Fieldname: resultdate is (datetime)

    SELECT *
    FROM vtest
    WHERE resultdate = DATE('2010-10-08')

    SELECT *
    FROM vtest
    WHERE To_CHAR(resultdate,'YYYY-MM-DD') = '2010-10-08'

    Thanks.
    Matt
    Last edited by mlong30; 11-16-10 at 14:06.

  2. #2
    Join Date
    Jun 2009
    Location
    Lisboa, Portugal
    Posts
    78
    Hi mlong30,

    You only have to write:

    SELECT * FROM vtest WHERE resultdate = "2010-10-08";

    Have fun!
    LS

Posting Permissions

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