Skip to Content

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    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

    Add a comment
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2013 at 06:21 AM

    Hi,

    Go through below link once its very much helpful

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

    Regards,

    Giri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2013 at 10:37 AM

    Use

    dateadd(qq,datediff(qq,0,table.column),0)

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.