Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding one month to a date
Message
De
31/10/2011 09:05:06
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Adding one month to a date
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01527671
Message ID:
01527671
Vues:
74
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform