Search This Blog

Wednesday, November 24, 2010

Functionality: Code for getting the future with the addition of on month to the current date

Function FutureDateOneMonth(vDate)
                Dim mon, yr
                mon = Month(Date)
                If mon =12  Then
      mon = "01"
                                yr = Year(Date)+1
   Else    
                                mon = (mon+1)
                                yr = Year(Date)
                End If
                If Len(mon)=1 Then
                                mon = "0" & mon
                End If
                vDate = mon & "/" & yr
End Function

No comments:

Post a Comment