Q: previous Quarter start and end date

J

JIM.H.

Hello,

I was expecting this two functions would return previous courtier start and
date.
For 12/20/2005, it should be pQsDate=7/1/2005 and pQeDate=9/30/2005, however
I am getting pQsDate=9/1/2005 and pQeDate=11/30/2005.

pQsDate = Format(DateSerial(Year(Now()), 3*((Month(Now())-3)\3),
1),"M/d/yyyy")
pQeDate = Format(DateSerial(Year(Now()), 3*((Month(Now())-3)\3)+3,
0),"M/d/yyyy")


Where is the problem? Any other suggestion?

Thanks,
 
K

KARL DEWEY

Your formula is giving you the previous 3 months and not the previous
quarter.
Use this --
pQsDate = DateAdd("q",-2,(Date()))+1
pQeDate = DateAdd("q",-1,(Date()))
 

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