|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Date differenceHow can I calculate date-number of days?
Example: Dim FirstDate as Date Dim SecondDate as Date FirstDate="01.12.2006" SecondDate=FirstDate+2 '1 is number of days and I must get "03.12.2006" or SecondDate=FirstDate-5 ' and I will get "26.11.2006" But it's not work! How can I calculate with dates in VB 2005? SecondDate = FirstDate.AddDays(2)
SecondDate = FirstDate.AddDays(-5) -- Show quoteHide quoteBest regards | Schöne Grüße Michael Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer http://weblogs.asp.net/mschwarz/ http://www.ajaxpro.info/ "Zile" <bozid***@yahoo.com> schrieb im Newsbeitrag news:ejsfvl$vgo$1@sunce.iskon.hr... > How can I calculate date-number of days? > Example: > > Dim FirstDate as Date > Dim SecondDate as Date > > FirstDate="01.12.2006" > SecondDate=FirstDate+2 '1 is number of days and I must get "03.12.2006" > > or > > SecondDate=FirstDate-5 ' and I will get "26.11.2006" > > But it's not work! How can I calculate with dates in VB 2005? >
naming conventions forced by VS.NET?
Attribute instantiation How to declare a sub class thread dead lock Passing multiple arguments to the client-side JavaScript function in AJAX Can a Decimal variable be set to "Not a Number" I need 2-3 books on VB.NET, Office automation. Any suggestions? DataGridView1 (VS2005) Search string in textfile Multi line grid row with .net compact framework 2.0 |
|||||||||||||||||||||||