elena,
You can't cast, but you can convert.
Use the static Parse method on the TimeSpan class to convert this to a
TimeSpan instance. If you need that time to be for a specific date, then
you need to create a DateTime instance for the date that this time is on,
then add the time to that date and produce a new DateTime instance.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"elena" <el***@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
Hi, All
Please, i need help with cast string to DateTime:
DateTime dt = new DateTime(2006,09,17); it works i can update Field in
Access DB
Next field is Short Time data type, how i can cast
string myTime = "13:30";
elena