C# .NET - 24 hour # 12 hour - Asked By mouhannad attar on 07-Nov-07 01:51 AM

hi,

i want to get the time from system's clock  for determining the enter time and exit time of Employee. but i want to deal with 12 hour so how can i get the true difference between enter and exit hour. in other word, i can not convert 12 hour into 24 hour .

DateTime objects are "complete" - Peter Bromberg replied to mouhannad attar on 07-Nov-07 06:45 AM

in and of themselves, the only difference between 12 hour and 24 hour display is the output format. So if you subtract one datetime object from another, you will get a TtimeSpan object equal to the exact time difference between the two datetime objects.

No conversion to "24 hour" time is necessary.