Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
We have a very useful table in our data warehouse called period. The primary key is the date and other fields include fiscal year, fiscal quarter, fiscal period, holiday, and a few more. You might want to consider something similar.