Results 1 to 4 of 4
  1. #1
    nyneave is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    24

    Query by Date on formatted date column is not working

    I am using Access 2003 - I have a linked table that was xml data so all columns are text data type. However, the actual data in a few of the columns such as Date_of_Birth are date values. I need to be able to query by these values so I am first doing the following on the column:

    DOB: Format(CDate([DATE_OF_BIRTH]),"mm/dd/yyyy")



    Then in the criteria, I am using > #12/31/2009#

    It is returning all data, all dates. Can anyone help?

    Thanks,
    Nyneave

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try without the Format() function. It changes the output to text.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nyneave is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    24
    Perfect...thank you so much!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 08-21-2012, 03:05 PM
  2. Date Entry in formatted field
    By gg80 in forum Forms
    Replies: 2
    Last Post: 02-10-2012, 06:35 PM
  3. Date not Properly Formatted in Crosstab Query
    By eliascm in forum Queries
    Replies: 4
    Last Post: 02-10-2012, 04:49 AM
  4. Query for date range from two column?
    By sunny in forum Queries
    Replies: 2
    Last Post: 07-28-2010, 07:12 AM
  5. Replies: 3
    Last Post: 11-19-2009, 09:15 PM

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