Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change number to a date (Access 2003)

    I am receiving a value from a linked ODBC connection that returns a value instead of a date. I can get the number into the format 20040714, but how can I convert this number into a date 07/14/2004 using either the table or a query? I don't want to change the data type in the table because it is preset due to the ODBC connection. Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change number to a date (Access 2003)

    Hello Angie (may I call you that? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>)

    Welcome to the Lounge. You can create a calculated column in a query based on the linked table. Say that the number field is named DateNumber. The expression to convert to a date would look like this:

    TheDate: DateSerial([DateNumber]10000,([DateNumber] Mod 10000)100,[DateNumber] Mod 100)

  3. #3
    New Lounger
    Join Date
    Jul 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change number to a date (Access 2003)

    Perfect. Thanks!

Posting Permissions

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