Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding one month to a date
Message
From
31/10/2011 09:05:06
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Adding one month to a date
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01527671
Message ID:
01527671
Views:
75
If ldDate is Date.Now, how come I add one month and it gives November 30, 2011?
Dim ldDate As Date = Date.Now
Dim lnMonth As Integer = 0
ldDate = ldDate.AddMonths(lnMonth)
We are the 31st. So, isn't adding one month should bounced it back to November 31st, 2011?
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