Yesterdays date

  • Thread starter Thread starter Sunny Girl
  • Start date Start date
S

Sunny Girl

Hi

I'm trying to use the date function in an access 2000 query to display data
for only yesterdays date, that works ok using date()-1 but how do I cope
with the weekend? On Monday I want to pick up Friday's data not Sundays.

The data comes in the format yyyymmdd and I'm converting it to dd/mm/yyyy.
Would it be any easier to use it in its direct form for this?

Thanks in advance.

Ruth
 
Hi Ruth, Use the following in your query in place of the date()-1

IIf(Weekday(Date())=2,Date()-3,Date()-1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top