Results 1 to 4 of 4
  1. #1
    EHittner is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    32

    Data Type Conversion in Query

    How do I convert a date string that's in text format to date format? I.e., "10/04/2004" is treated as text and I want to use it in a date comparison function. I want to do this automatically using a query so I don't have to manually change the format in the table each time.

  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 the CDate() function.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    EHittner is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    32
    CDate was just what I needed. Thanks 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
    No problem, glad it worked for you.
    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: 2
    Last Post: 03-18-2010, 08:24 PM
  2. data type mis match
    By cowboy in forum Programming
    Replies: 3
    Last Post: 03-12-2010, 11:54 AM
  3. Attachment data type INSERT INTO not working
    By LouisLouis in forum Programming
    Replies: 0
    Last Post: 09-27-2009, 02:23 PM
  4. Number data type
    By BernardKane in forum Access
    Replies: 1
    Last Post: 11-11-2006, 08:19 PM
  5. query for data type number
    By oracle in forum Queries
    Replies: 1
    Last Post: 12-14-2005, 03:35 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