Sub DateAddExample()
Debug.Print DateAdd("d", 3, Now)
'Today plus 3 days
Debug.Print DateAdd("m", 3, Now)
'Today plus 3 months
Debug.Print DateAdd("yyyy", 3, Now)
'Today plus 3 years
Debug.Print DateAdd("q", 3, Now)
'Today plus 3 quarters
Debug.Print DateAdd("ww", 3, Now)
'Today plus 3 weeks
Debug.Print DateAdd("ww", -3, Now)
'Today minus 3 weeks
End Sub
|