what if you want to retrieve today’s date?
MsgBox Date()
But what about yesterday’s date? it’s just as easy to determine yesterday’s date as it is today’s date.
That’s because VBScript can do date arithmetic: give it today’s date, and then you can simply subtract 1 day to determine yesterday’s date. In other words:
MsgBox Date() - 1
Want to know tomorrow’s date?
MsgBox Date() + 1
Based on " How Can I Get Yesterday’s Date?" from the Scripting Guys.
Posted in VBScript

daniva




Recent Comments