Results 1 to 3 of 3

Thread: Saving a Date Field as a String?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    19

    Saving a Date Field as a String?

    I am building the save program for my application, and I have several controls that are date controls.

    Can I cast the date as a string? How would I go about that?

    Thanks a bunch!
    Mike

  2. #2
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    Location
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
    Posts
    4,495

    Re: Saving a Date Field as a String?

    Well, if you are using a Date or DateTime object, first thing to do is check the date class and look at the methods. You will notice several ways of converting it to a string, like one example below:
    VB Code:
    1. Dim Today As Date = Date.Now
    2. MessageBox.Show(Today.ToShortDateString)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    19

    Re: Saving a Date Field as a String?

    Quote Originally Posted by gigemboy
    Well, if you are using a Date or DateTime object, first thing to do is check the date class and look at the methods. You will notice several ways of converting it to a string, like one example below:
    VB Code:
    1. Dim Today As Date = Date.Now
    2. MessageBox.Show(Today.ToShortDateString)
    Thank you... one more question: how do I put it back? How do I convert the text string and repopulate the date control properly?

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