Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Thanked 0 Times in 0 Posts

    convert string to date (2000)

    Is it possible to convert a string expression to a date expression.

    I capture a licensing date which the characters of the end date are sprinkled in with letters and numbers. This string is 35 characters long. I pick out each part of a date by using the Mid function. I build this string into a "date" format mm/dd/yyyy, but when I try to use this in a calculation...there is a mismatch.

    is there a way to convert this string into a date type expression?


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: convert string to date (2000)

    You can use the DateValue or CDate function.

    Dim strDate As String
    Dim dteDate As Date

    strDate = ... ' extract mm/dd/yyyy from long string
    dteDate = DateValue(strDate)

Posting Permissions

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