Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DateDiff() month issue
Message
From
03/10/2011 21:07:00
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
DateDiff() month issue
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01525500
Message ID:
01525500
Views:
80
I have a date given such as August 5th, 2007. This is in the tdDate parameter.

I have this code:
lnMonth = DateDiff(DateInterval.Month, tdDate, Date.Now)
It gives 50. How can it gives 50 if we do not have completed the 2nd month of this fifth year yet? Basically, four years have elapsed. So, that gives 48 months. Then, on September 5th, 2011, this moves it to 49. But, how could it have moved to 50 if we are not October 5th yet?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform