Hi,
Í need to get a date dd-mm-yy minus 1 week
thanx for your help
Printable View
Hi,
Í need to get a date dd-mm-yy minus 1 week
thanx for your help
use this:
d = Format(Date - 7, "dd-mm-yy")
rest once week only.
You could also use the more robust DateAdd function, example as follows:
>> Outputs "02/08/2000"Code:Dim dtCurrent As Date
Dim dtPrevWeek As Date
dtCurrent = DateValue("2000-Feb-15")
dtPrevWeek = DateAdd("ww", -1, dtCurrent)
debug.print dtPrevWeek
If you look up this function you'll see that it provides alot more functionality.
Later.