<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx</link><description>Posted by: Duncan Mackenzie , MSDN This post applies to Visual Basic .NET 2002/2003 This common question is often phrased as "How do I find the number of hours between two dates?", substituting minutes, seconds, days, or whatever interval you are looking</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#144723</link><pubDate>Mon, 31 May 2004 02:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144723</guid><dc:creator>James Hancock</dc:creator><description>Now what would be more interesting is finding the number of months (in a specified calendar) between two dates. Ditto for years.  VB6 did this, .net doesn't. BIG GOOF LEAVING THIS OUT.</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#144724</link><pubDate>Mon, 31 May 2004 02:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144724</guid><dc:creator>Duncan Mackenzie</dc:creator><description>James.... &lt;br&gt;&lt;br&gt;Console.WriteLine(&amp;quot;{0} Years&amp;quot;, _&lt;br&gt;      DateDiff(DateInterval.Year, D1, D2))&lt;br&gt;Console.WriteLine(&amp;quot;{0} Months&amp;quot;, _&lt;br&gt;      DateDiff(DateInterval.Month, D1, D2))&lt;br&gt;&lt;br&gt;&lt;br&gt;Doesn't that do what you want?</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#144726</link><pubDate>Mon, 31 May 2004 03:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144726</guid><dc:creator>James Hancock</dc:creator><description>Works great... in VB. Doesn't work great in anything else .net unless you include the VB6 legacy stuff, and I don't feel like doing that in my apps. (Yes, I know this is a blog about VB, but this should be part of the .net framework, not a backwards compatiblity hack.)</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#144764</link><pubDate>Mon, 31 May 2004 06:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144764</guid><dc:creator>Duncan Mackenzie</dc:creator><description>DateDiff is not part of the VB6 legacy stuff, it is part of the VB language and part of Microsoft.VisualBasic.dll. My honest feeling on this is that if you like the features that VB gives you, you should use VB.NET... you'd be happier with it. Perhaps the goof was choosing to use a different .NET language when you are obviously used to the features of VB?&lt;br&gt;&lt;br&gt;Should it have been part of the Framework? No idea, but it is not in any way a backwards compatibility feature. There are classes provided in VB for legacy support, but this is not one of them.&lt;br&gt;&lt;br&gt;Many people have discussed this before, but the Microsoft.VisualBasic.Compatibility.dll is something that I can understand you would want to avoid, but Microsoft.VisualBasic.dll does not fall into the same category.</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#144986</link><pubDate>Mon, 31 May 2004 18:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144986</guid><dc:creator>James Hancock</dc:creator><description>Unsafe code blocks.&lt;br&gt;&lt;br&gt;thus C#&lt;br&gt;&lt;br&gt;Finding the number of months and years between two dates is BASIC stuff for any language that wants to be used for anything to do with accounting, inventory management, or numerous other things.&lt;br&gt;&lt;br&gt;Result:  BIG GOOF LEAVING THIS OUT.</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#149468</link><pubDate>Sun, 06 Jun 2004 08:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:149468</guid><dc:creator>Cory Smith</dc:creator><description>The Microsoft.VisualBasic namespace is shipped as a STANDARD PART of the Microsoft implementation of the .NET Framework Class Libraries.  It's on *EVERY* machine that the framework is installed upon.  These functions are available to *ALL* languages that wish to reference the dll.  IT IS A PART OF THE .NET FRAMEWORK... so... your &amp;quot;Big Goof Leaving This Out&amp;quot; is totally wrong.&lt;br&gt;&lt;br&gt;The Microsoft.VisualBasic.Compatiblity, as Duncan already stated, is NOT to be confused with Microsoft.VisualBasic.  They are two completely different files and the Compatibility one is not automatically installed with the .NET Framework redistributable.&lt;br&gt;&lt;br&gt;Question?  Are you willing to use code/component libraries from companies such as Desaware, Dart, Infragistics and ComponentOne?  Does it matter what language these originally target (or even written in) if they can be utilized in your language of choice?  If it improves your overall productivity the cost of those products is not an issue.  What you are failing to see is that there's an excellent library included within the .NET Framework that you are unwilling to even consider simply because it has the VisualBasic label on it.&lt;br&gt;&lt;br&gt;What you also need to understand, what is in the current version of Microsoft.VisualBasic is nothing in comparison to what will be in the next version...</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#171780</link><pubDate>Fri, 02 Jul 2004 14:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:171780</guid><dc:creator>Mrs S. krishnan</dc:creator><description>how to find the present age as on date .date diff is to be used toaday's date - date of birth&lt;br&gt;&lt;br&gt;kindly let me know</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#174293</link><pubDate>Tue, 06 Jul 2004 19:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:174293</guid><dc:creator>Tom Gross</dc:creator><description>How do I calculate the total number seconds between two DateTimes in C#???</description></item><item><title>re: How do I determine the difference between two dates?</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#174324</link><pubDate>Tue, 06 Jul 2004 20:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:174324</guid><dc:creator>Duncan Mackenzie</dc:creator><description>Tom, did you read the post? The syntax is a little different, but the technique is exactly the same&lt;br&gt;&lt;br&gt;&lt;br&gt;TimeSpan difference = D2.Subtract(D1);&lt;br&gt;Console.WriteLine(&amp;quot;{0} Seconds&amp;quot;, difference.TotalSeconds);</description></item><item><title>Como saber cuantos mese hay en tantos dias? | hilpers</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#9350244</link><pubDate>Tue, 20 Jan 2009 22:28:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9350244</guid><dc:creator>Como saber cuantos mese hay en tantos dias? | hilpers</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.hilpers-esp.com/434541-como-saber-cuantos-mese-hay"&gt;http://www.hilpers-esp.com/434541-como-saber-cuantos-mese-hay&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>NUMERO GIORNI | hilpers</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#9357115</link><pubDate>Wed, 21 Jan 2009 21:05:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9357115</guid><dc:creator>NUMERO GIORNI | hilpers</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.hilpers.it/1715880-numero-giorni"&gt;http://www.hilpers.it/1715880-numero-giorni&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Visual Basic Frequently Asked Questions How do I determine the | Uniform Stores</title><link>http://blogs.msdn.com/vbfaq/archive/2004/05/30/144571.aspx#9690625</link><pubDate>Wed, 03 Jun 2009 13:32:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9690625</guid><dc:creator> Visual Basic Frequently Asked Questions How do I determine the | Uniform Stores</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://uniformstores.info/story.php?id=41998"&gt;http://uniformstores.info/story.php?id=41998&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>