1 Reply Latest reply: Jul 25, 2012 11:02 AM by Dan Bracuk RSS

    Query - calculate quarter-to-date?

    sakonnetweb Community Member

      Hello

       

      Trying to "do the math" - getting nowhere fast.

       

       

      <cfset FirstDayOfQuarter = ?>

      <cfset LastDayOfQuarter = #CreateODBCDate(Now())#>

       

       

       

      SELECT etc.

       

      WHERE ((order_create_date BETWEEN #CreateODBCDate(FirstDayOfQuarter)# AND #CreateODBCDate(LastDayOfQuarter)#))

       

      I'm sure there is more than one way to accomplish this, and CF has #Quarter(Now())# but that result just dispalys what quarter you happen to be in now.

       

      Any help would be appreciated.....

       

      Thanks- Norman