1st Of Every Month

J

Jose Aleman

Hi,

I'm trying to build a query that gives me the first day of the current
month. This is what I currently have:

When I run my query it returns 10/1/06 and I want 11/1/06
DateAdd("m",-1,Date()-Day(Date()))+1

I try using the same concept as I use in SQL2K but it did not work. This is
what I use for SQL2K and it work like a charm but I'm not really familiar
with access.
convert(varchar,DATEADD(mm, DATEDIFF(mm,0,getdate()), 0),101) as data_date

Please help

Thanks
 
J

Jose Aleman

OK I got it...

I had to break the function in two.
DateAdd("m",0,Date())-Day(Date())
 
J

Jeff Boyce

Jose

Another approach would be:

DateSerial(Year(Date()), Month(Date()), 1)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Top