Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Location
    Epsom, United Kingdom
    Posts
    42

    Unanswered: Newbie Access Question!

    Greetings!

    I have the following query :

    Code:
    SELECT DEFER_STARTDTE  
    FROM DEFER
    WHERE DEFER_STARTDTE <= '01/11/1996'
    and the DEFER_STARTDTE field is a DateTime field. When I attempt to run the above query I get a 'Data type mismatch in criteria expression'.

    Do you I need to convert my string '01/11/1996' to a DateTime value since the field is also a DateTime value and if that's the case, what's the syntax for changing the data type of the expression. Is it also similar to the SQL Server CONVERT and CAST functions?

    Your help would be appreciated.
    Shadow to Light

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    SELECT DEFER_STARTDTE
    FROM DEFER
    WHERE DEFER_STARTDTE <= #01/11/1996#

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Date format is the mm/dd/yy
    and should be between # #
    #03/16/2004# 'for today

  4. #4
    Join Date
    May 2003
    Location
    Epsom, United Kingdom
    Posts
    42

    Talking

    Originally posted by hammbakka
    SELECT DEFER_STARTDTE
    FROM DEFER
    WHERE DEFER_STARTDTE <= #01/11/1996#
    Your suggestion works!

    Thank you.
    Shadow to Light

Posting Permissions

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