| |||||||
This is a discussion on Calculate total year and month within the ASP/ASP.NET section, part of the Programming category; hai there.... For total year and month calculation i am using this code..but it always giving me incorrect month... Please ...
![]() |
|
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
hai there....For total year and month calculation i am using this code..but it always giving me incorrect month... Please lightup ![]() Code:
Dim Strdifyears,Strdifmonth,ff
Strdifyears=DateDiff("yyyy",RS.fields("Frmdt"),Date)+(Date<DateSerial(Year(Date),Month(RS.fields("Frmdt")),Day(RS.fields("Frmdt"))))
ff=ff+(Date<DateSerial(Year(Date),Month(RS.fields("Frmdt")),Day(Rs.fields("Frmdt"))))
If Cint(ff)<0 then
Strdifmonth=12-Cint(Month(Rs.fields("From_dt")))
End If
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |