VB.NET Date Difference in Milliseconds

To calculate date difference in milliseconds, we can't use 'DateDiff' function since the lower precision is second.

Thus, one good way is to use system.datetime.ticks

Dim myDateStarts as date 
Dim myDateEnds as date 
Dim totalDuration as long

Dim tempTickCount as long = myDateEnds.Ticks - myDateStarts.Ticks 

totalDuration = (tempTickCount / 10000) 'convert to milliseconds

It works perfectly with high precision!

Comments

Anonymous said…
c9aqz [url=http://www.beatsheadphonesforsales.com]beats headphone[/url] ymrkdp http://www.beatsheadphonesforsales.com xpjc [url=http://www.cheapdrebeatsforsales.com]beats by dr dre[/url] khpscj http://www.cheapdrebeatsforsales.com gylj [url=http://www.cheapbeatsdrdreforsales.com]beats headphone[/url] ggvgox http://www.cheapbeatsdrdreforsales.com eeail [url=http://www.drdreheadphonesforsales.com]beats by dr dre[/url] lcryij http://www.drdreheadphonesforsales.com ygjbw ifysk [url=http://www.drdrebeatsonlinestores.com]dr dre beats[/url] osggv http://www.drdrebeatsonlinestores.com qfy
Anonymous said…
yiriu [url=http://www.beatsheadphonesuksale.co.uk]dr dre beats[/url] cezfpmcu http://www.beatsheadphonesuksale.co.uk qaccuftil egsskl [url=http://www.cheapbeatsukheadphonesale.co.uk]beats by dre[/url] zrlttdzahttp://www.cheapbeatsukheadphonesale.co.uk csljtmcri sazkyl [url=http://www.cheapbeatsbydreuksales.co.uk]cheap beats by dre[/url] ackqrsxt http://www.cheapbeatsbydreuksales.co.uk jqdgqyoax hezpen [url=http://www.cheapbeatsbydresaleuk.co.uk]dr dre beats[/url] dqhjqwhh http://www.cheapbeatsbydresaleuk.co.uk ywthcwlju kovbyo [url=http://www.cheap-beatsbydreuk.co.uk]cheap beats by dre[/url] lwqkhqmc http://www.cheap-beatsbydreuk.co.uk bbpdhsyhp urpaem [url=http://www.beatsbydrdreukonsale.co.uk]dr dre beats[/url] iebonyok http://www.beatsbydrdreukonsale.co.uk aoovdxday u
Anonymous said…
Wow, incredible blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your site is great, let alone the content!


Look into my web page - beitragssatz gesetzliche krankenkasse
Anonymous said…
I don't know whether it's just me or if everybody else encountering issues with your
blog. It appears as if some of the written text on your posts are running off the
screen. Can someone else please provide feedback and let me know if this is happening to
them as well? This might be a problem with my internet browser because I've had this happen previously. Thank you

Take a look at my blog post: bad credit finance
Anonymous said…
Wonderful items from you, man. I've take into accout your stuff previous to and you are simply extremely magnificent. I actually like what you have got here, really like what you are saying and the way wherein you assert it. You are making it entertaining and you continue to take care of to stay it wise. I can not wait to learn much more from you. That is really a tremendous site.

my website: günstiger online shop kleidung
Anonymous said…
It does work, thanks