G
Guest
Hi
I'm trying to build up my own code and I need to be able to identify last
Wednesday, next Tuesday, that sort of thing. I believe the following
identifies last Wednesday, but I don't really understand how it works:
DateAdd("d", 1 - Weekday(Date, vbWednesday), Date)
If this is correct, what would the code be to identify last Thursday, or
last Friday?Also, what would be code be to identify next Wednesday, next
Thursday, next Friday etc? If I could see these, I could figure out what the
various parts of the code are actually doing. Unless someone could do that
easily or point me towards some good links for this type of thing.
Many thanks for the help. JohnB
I'm trying to build up my own code and I need to be able to identify last
Wednesday, next Tuesday, that sort of thing. I believe the following
identifies last Wednesday, but I don't really understand how it works:
DateAdd("d", 1 - Weekday(Date, vbWednesday), Date)
If this is correct, what would the code be to identify last Thursday, or
last Friday?Also, what would be code be to identify next Wednesday, next
Thursday, next Friday etc? If I could see these, I could figure out what the
various parts of the code are actually doing. Unless someone could do that
easily or point me towards some good links for this type of thing.
Many thanks for the help. JohnB