cancel
Showing results for 
Search instead for 
Did you mean: 

Previous quarter from the current date using Date functions

rama_krishna51
Explorer
0 Kudos

hi all,

how can i get the value of the previous quarter and previous month using using NOW() function in the formula.

regards,

Rk

Edited by: Rk on Feb 13, 2009 9:28 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

rama_krishna51
Explorer
0 Kudos

Hi all,

Im using the formula "DSTR(DADD(NOW(),-1,'M'),'YYYYMM') " for getting the previous month, but im not able to get the previous quarter with a similar formula.. i.e "DSTR(DADD(NOW(),-1,'Q'),'YYYYQ')",

any help would be highly appreciated.

regards,

Rk

Former Member
0 Kudos

Hi Pk,

This "DSTR(DADD(NOW(),-1,'Q'),'YYYYQ')" will give you just an year 2008 (if you run this today).

But this "DSTR(DADD(NOW(),-1,'Q'),'YYYYMM)" will give you an year and month of prev quarter

200811(if you run this today)

Ola