Format time string

  • Thread starter Thread starter grant
  • Start date Start date
G

grant

Good day,

I have been trying to understand cultures and formatProviders etc but I cant
get on top of this simple problem:
I have a text box displaying "07:15" - how do I convert that string to a
DateTime format so that I can get it into the database?
It is an Access database with a data type of Date/Time formatted as 'Medium
Time' which is hh:mm AM/PM

Thank you.
Grant
 
grant said:
I have been trying to understand cultures and formatProviders etc but I cant
get on top of this simple problem:
I have a text box displaying "07:15" - how do I convert that string to a
DateTime format so that I can get it into the database?
It is an Access database with a data type of Date/Time formatted as 'Medium
Time' which is hh:mm AM/PM

DateTime.ParseExact

or

DateTime.TryParseExact

Arne
 
Back
Top