IAintaBlonde.com

Calculating session time using date time stamps in vb.net

Lets say your timestamp looks like this:

d1 -16:08 03-11-2006

d2 -12:00 06-11-2006
Its a pain to figure out what the studio spits out as errors, so here is long story short, the code of it!

SessionStart = DateTime.ParseExact(d1, “HH:mm dd-MM-yyyy “, Nothing)

SessionEnd = DateTime.ParseExact(d2, “HH:mm dd-MM-yyyy “, Nothing)
TotalSession = DateDiff(DateInterval.Minute, SessionStart, SessionEnd)

Now, wasnt that simple??

Yeah , worth couple of hours of a headahce!

, , ,

This entry was posted on Thursday, July 19th, 2007 at 4:49 pm and is filed under Visual Studio 2005, VB.NET. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply »»

Close
E-mail It