Results 1 to 4 of 4

Thread: Casting between String/Text and Dates

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    8

    Casting between String/Text and Dates

    Is is possible to convert a string/text type into a date (where it is YY-MMM-DD)

    Can someone show me?

    Thanks in advance.

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    yes

    but it depends how the string or text holds the date.

    more info please

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    It may also depend on what the date format is for your system, but in general Try using Date.Parse(mystring).

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    8
    I have two forms.
    On the first form the user uses a DATETIMEPICKER and chooses a date. The date is then inserted into a TEXT field in the format of DD-MMM-YY (ie. 11-Nov-03).

    This text value is then passed over to a second form.

    In this second form I assign a new date type variable.
    I think that I would need to do an assignment from the TEXT value that is passed into the 2nd form to the new date type variable?

    It errors out on the assignment line.

    Dim as dt as date

    dt = tempdate
    ' where tempdate is the date that is passed in from the other form

Posting Permissions

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



Click Here to Expand Forum to Full Width