time comparision accepting negative values

Posted by RohiK under VB.NET on 10/19/2011 | Points: 10 | Views : 1029 | Status : [Member] | Replies : 0
Hi all,

I get 2 values from user start time and end time. I want to validate both. if start time is greater than end time then fire an error message. or convert time into minutes
Now the problem is time can be negative like -10:00. the main problem occurs dealing with time like -00:22.
my logic is spliting time in hr and min. and then convert it into minute.
but when i convert -00 into integer to convert into hours ( hr*60) it returns 0 not -0.
how to do that?
plz help or if any other way to do that?
I want to fire validation in javascript too.

Happy Programming!!


(No response found.)

Login to post response