# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  >  to get previous day date in VB

## venkatatcts

Hi Friends,

I need to save a file with a format like

filename (previousdaydate) between (todaysdate)

if it is monday then 

filename (lastfridaydate) between (todaydate)

How to get the todaydate , previousdate, lastfridaydate

Thanks in Advance

Regards,
Venkatraman

----------


## JBeaucaire

Today's date in vba:

*Date*

Yesterday's date in vba:

*Date - 1*

Last Friday in vba:

*Format(DateAdd("D", -Weekday(Date) - 1, Date), "dd-mmm-yy")*

----------


## protonLeah

Try this for a start:
(With a date in cell A1)



```
Please Login or Register  to view this content.
```

----------

