Date value calculation : Date Type « Data Type « VBA / Excel / Access / Word






Date value calculation

 
Sub dateDemo()
    Dim datToday As Date
    Dim datNextWeek As Date
    Dim datLastWeek As Date
    Dim datePaymentDate As Date
    
    datToday = Date
    datNextWeek = datToday + 7
    datLastWeek = datToday - 7
    datPaymentDate = datToday + 30
End Sub

 








Related examples in the same category

1.Create Date type variable
2.Variables of type Date must have their values enclosed in # signs
3.Date Constants
4.Try It Out-Dates
5.Times
6.Date and Time Functions