BusinessObjects Board

last 12 month data

please help

I have to take the date from user…and extract the last 12 onth data from this date using month…for example if user enters 2nd june 1011, i need to publish data from 2nd june 2010…how to do this…??


newbouser23 (BOB member since 2011-07-01)

Hi,

What database do you use? The syntax depends on it.

Check also relative dates for SQL Server and Oracle here:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Try this (i’ve used sysdate), you can replace sysdate with your date prompt

trunc(sysdate) - 365

Note: Oracle Syntax


jprasanthram :switzerland: (BOB member since 2010-12-10)

tera data


newbouser23 (BOB member since 2011-07-01)

extract(year from your_date) - 365.

I dont have teradata to test this out, so please try and post if this works for you.


jprasanthram :switzerland: (BOB member since 2010-12-10)

Here’s the thread for Teradata relative dates: