Q: previous quarters start and end date

J

JIM.H.

Hello,

In VB, I want to set to variables value as previous quarters start and end
date, how can I do this?
Thanks,
 
J

John Vinson

Hello,

In VB, I want to set to variables value as previous quarters start and end
date, how can I do this?
Thanks,

dtStartOfQuarter = DateSerial(Year(Date), 3*((Month(Date)-1)\3), 1)
dtEndOfQuarter = DateSerial(Year(Date), 3*((Month(Date)-1)\3)+3, 0)

John W. Vinson[MVP]
 
J

JIM.H.

Hi John,
Thanks for the reply. It seems this gives the current quarter, not previous.
 
Top