Parsing Textfields or dimmed Results

Selecting a date on a calendar produces a date and Time (Control off of the web, gtcalendar). I want to parse the date and time, and only use the Date. Which I will add to a database to keep track of my call back dates (Dates I want to call that person again) . If I have this as a result of a selected date 2014-15-02 13:01:00, what would be the best way to parse this?

Thanks in advance!

Looks like you can split it on the space:

Dim dateValue As String = " 2014-15-02 13:01:00" Dim dateParts() As String = dateValue.Split(" ")

Then you can assign the date to the SQLDate property of a new Date:

Dim d As New Date d.SQLDate = dateParts(0)

Easiest way:

dim justDate as string = wholeDate.NthField( " ", 1 )

[quote=66191:@Kevin Cleary]Selecting a date on a calendar produces a date and Time (Control off of the web, gtcalendar). I want to parse the date and time, and only use the Date. Which I will add to a database to keep track of my call back dates (Dates I want to call that person again) . If I have this as a result of a selected date 2014-15-02 13:01:00, what would be the best way to parse this?

Thanks in advance![/quote]

Do you really get the date back as YYYY-DD-MM ?
That’s an unusual date format and if you stuff that into a database you’ll likely have trouble getting the call list for “today”

Thanks so much! Norman, Yes, that is how it comes back. Should I try to reformat it first?

Kem, did the trick:-) I read a ton about Parsing and Splitting…Seems like the more you read sometimes it becomes way to convoluted! All of your guy input is greatlt appreciated!!!

Thanks,

Kevin