# first date of the any quarter

Hi all,

I am looking for a solution in Sybase IQ for my BO reporting point.

Based on the date I should calculate First of the quarter. Example : I have a start date and end date, If my end date is today 09/24/2013 then my start date should be 07/01/2013.

Please provide how to get the first day of the quarter based on the dates ???

Environment : 4.0 SP5, IDT

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Sep 25, 2013 at 06:17 AM

Hi RUC,

Can you try below logic:

In universe designer create a date filter as:

date =

to_date(CASE WHEN QUARTER(your_date)=1 THEN {fn concat('01/01',YEAR(your_date)}WHEN QUARTER(your_date)=2 THEN {fn concat('04/01',YEAR(your_date)}WHEN QUARTER(your_date)=1 THEN {fn concat('07/01',YEAR(your_date)}

WHEN QUARTER(your_date)=1 THEN {fn concat('10/01',YEAR(your_date)}

END),'mm/dd/yyyy')

Gaurav

10|10000 characters needed characters exceeded
• Posted on Sep 25, 2013 at 02:46 AM

It looks like this question has been cross-posted and already answered here.

Noel

10|10000 characters needed characters exceeded
• Former Member
Posted on Sep 25, 2013 at 06:21 AM

Hi,

http://blog.davidg.com.au/2012/11/workdays-between-two-dates-in-webi.html

Regards,

Giri

10|10000 characters needed characters exceeded
• Former Member
Posted on Sep 25, 2013 at 10:37 AM

Use