Help with Date()

  • Thread starter Thread starter Avid Reader
  • Start date Start date
A

Avid Reader

Hi all,

I have a query that runs based on yesterday's date.

So I use the command Format(Date(),"yyyymmdd")-1 which works fine until I
get to the end of the month then all is screwed up.

Like today, with the date function that I'm using above will produce
something like 20060600, instead of the intended date of 20060531.

I'm guessing that this would be somewhat of an easy fix and appreciate all
the help.

Thanks


Antonio
 
Hi all,

I have a query that runs based on yesterday's date.

So I use the command Format(Date(),"yyyymmdd")-1 which works fine until I
get to the end of the month then all is screwed up.

Like today, with the date function that I'm using above will produce
something like 20060600, instead of the intended date of 20060531.

I'm guessing that this would be somewhat of an easy fix and appreciate all
the help.

Thanks

Antonio

Format(Date()-1,"yyyymmdd")
 

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

Similar Threads

Excel Message box with days of month & date. 1
Excel Help with dates 2
date function 3
Excel Excel Show Countdown Date 7
Max & Min Dates 0
PARSE DATE FIELD 5
Displaying data from the past six months 1
Date search query 0

Back
Top