Results 1 to 3 of 3

Thread: how do u change string into date

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2001
    Posts
    41

    how do u change string into date

    I have a string stored in a label and i need to change it back to a dateTime obj

    can someone tell me if it can be done

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Search the forum for ParseExact, someone asked about this a couple of weeks ago.

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Assuming you just did something like this to put a date in your label:
    Label1.Text = DateTime.Now.ToString()

    Then you can do this:
    Dim dt As New DateTime()
    dt = DateTime.Parse(Label1.Text.ToString())
    MessageBox.Show(dt.ToString())

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