hi everyone i need to calculate data for previous 6 months i.e if the report is generated on may 1st 2013 …then the report should give result for (nov-12,dec-12,jan-13,feb-13,mar-13,april-13).
i have a object called ticket_create_date(which gives the date of the ticket creation)
nikk (BOB member since 2013-03-27)
In universe create objects using add month -1, add month -2,…
depending on the database add month function’s syntax varies.
Create objects in universe and use the same in the report
Venkateshwaran.N (BOB member since 2008-03-28)
Hi,
This sticky topic can help you:
As per this topic on Oracle relative dates, here’s the same set of dates in SQL Server.
Please note that some may not work on SQL Server 2000, but all definitely work in 2005/8.
Yesterday
cast(convert(char(10),dateadd(d,-1,getdate()),23) as datetime)
Today
cast(convert(char(10),getdate(),23) as datetime)
The following also works for today:
dateadd(dd, datediff(dd,0,getdate()), 0)
Start of Current Month
cast(convert(char(7),getdate(),23)+'-01' as datetime)
End of Current Month
dateadd(d,-1…
Marek Chladny (BOB member since 2003-11-27)