Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Formula 1

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Hi All,

I am having difficulty with a date formula, I am currently using the following formula to get the dates I require
=TEXT(NOW()-1,"dd.mm.yy") result = 15.05.02,I need to create a formula that always shows the previous saturday's date, for this week it would be 11.05.02, the file that the formula is in is opened everyday and I need to make sure each day for this week it would show the previous saturday's date, I need the format of the date in exactly the same format, as it is used with a macro to open the current weekly file which starts on a saturday. Does anybody have any idea's on this?

Thanks in advance
 
The following formula should do the trick...

=TEXT(NOW()-MOD(NOW(),7),"dd.mm.yy")

Hope this helps. :) Please advise as to how you make out with it.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Rob,

Just in case you want to revert back to the previous Saturday when the current day is Saturday, the following formula will work...

=TEXT(NOW()-(IF(MOD(NOW(),7)<1,7,MOD(NOW(),7))),&quot;dd.mm.yy&quot;)

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top