Hi,
I have a requirement where I need to convert the date into quarters.Please can anyone tell me how to achieve this.
example
date Quarter
20/03/2009 Q109
20/06/2009 Q209
20/09/2010 Q310
20/11/2011 Q411
how to change date to quarter
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
-
- Participant
- Posts: 36
- Joined: Mon Jul 16, 2007 3:37 am
- Location: USA
Re: how to change date to quarter
You can get ur results from following stage variables.
sv1: MonthFromDate(input_date)/3
sv2: Ceil(sv1)
sv3: 'Q' : sv2 : YearFromDate(input_date) [3,2]
sv1: MonthFromDate(input_date)/3
sv2: Ceil(sv1)
sv3: 'Q' : sv2 : YearFromDate(input_date) [3,2]
VINOD