Tuesday, 27 August 2013

Convert string to TimeSpan doesn't work

Convert string to TimeSpan doesn't work

i'm trying to convert a string into timeSpan but i can't seem to do it.
i'm using c++ managed code:
TimeSpan timeSpan;
if (TimeSpan::TryParse("01.55", timeSpan))
{
int minute = timeSpan.Minutes;
int hours= timeSpan.Hours;
//do some work here
}
the TryParse is returning flase. what am i doing wrong ?
Thank you,

No comments:

Post a Comment