Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Transform a string in a date? (2003)

    How to convert the following string: 20030107 in the following date 01.07.2003? I would like to built a function to be able to use it in a make-table query.

    Thanks for your help.

    Marcel

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

    Re: Transform a string in a date? (2003)

    Say that you have a number field (or text) field DateYMD containing values such as 20030107. The following expression will return a date value that can be displayed according to any valid date format:

    DateSerial(Left([DateYMD],4),Mid([DateYMD],5,2),Right([DateYMD],2))

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Transform a string in a date? (2003)

    Hans,

    Sorry to not getting back to your sooner. I just want to thank you for your help. It works perfectly.

    Best regards,

    Marcel

Posting Permissions

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