by Julito Amodia (8 Submissions)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Mon 15th May 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This will allow you to know the previous month and next month using asp codes. i hope that this codes will help you lots in your codes in
Function GetPrevMonth(iThisMonth,iThisYear)
GetPrevMonth=month(dateserial(iThisYear,iThisMonth,1)-1)
End Function
Function GetPrevMonthYear(iThisMonth,iThisYear)
GetPrevMonthYear=Year(dateserial(iThisYear,iThisMonth,1)-1)
End Function
Function GetNextMonth(iThisMonth,iThisYear)
GetNextMonth=month(dateserial(iThisYear,iThisMonth+1,1))
End Function
Function GetNextMonthYear(iThisMonth,iThisYear)
GetNextMonthYear=year(dateserial(iThisYear,iThisMonth+1,1))
End Function
%>
'use in DEMO
response.write GetPrevMonth(Month(Now), Year(Now)) & "/" & GetPrevMonthYear(1, 2002) & " " & GetNextMonth(Month(Now), Year(Now)) & "/" & GetNextMonthYear(Month(Now), Year(Now))
%>
No comments have been posted about This will allow you to know the previous month and next month using asp codes. i hope that this cod. Why not be the first to post a comment about This will allow you to know the previous month and next month using asp codes. i hope that this cod.