Skip to Content
avatar image
Former Member

Quarter in Lumira


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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers