Skip to Content
0

Quarter in Lumira

Dec 05, 2016 at 02:57 PM

23

avatar image
Former Member

Hello,

How can i have this tsql code in Lumira.

--First Day of the Quarter
select DATEADD(qq,DATEDIFF(qq,0,getdate()),0)
--First Day of Previous Quarter
select DATEADD(qq,DATEDIFF(qq,0,DATEADD(qq,-1,getdate())),0)
--First Day of two quarters ago
select DATEADD(qq,DATEDIFF(qq,0,DATEADD(qq,-2,getdate())),0)
--First Day of three quarters ago
select DATEADD(qq,DATEDIFF(qq,0,DATEADD(qq,-3,getdate())),0)
--First Day of four quarters ago
select DATEADD(qq,DATEDIFF(qq,0,DATEADD(qq,-4,getdate())),0)

i want to limit my quarter time for the last 4 quarters (I do not want the current quarter).

for example now we are 05/12/2016 so i want this

Q1 ==> 01/10/2015 to 31/12/2015

....

Q4 ==>01/07/2016 to 30/09/2016

Thanks a lot

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers