Results 1 to 3 of 3
  1. #1
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    DATE CONVERSION (A2K SR1)

    A query contains a field as a general number as follows: 20020525. The number represents a date in the format YYYYMMDD. How can I convert this number to a date field as MM/DD/YYYY?
    Regards,

    Gary
    (It's been a while!)

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DATE CONVERSION (A2K SR1)

    Use the following expression in an update query
    <pre>Format(DateSerial(Left([NumericField],4),Mid([NumericField],5,2),Right([NumericField],2)),"MM/DD/YYYY")</pre>

    Francois

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: DATE CONVERSION (A2K SR1)

    Thanks Francois,

    I had just figured that one out for myself.
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

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