COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: rajua99 on 07 Mar 2012 12:07:20 PM

Title: Current Date
Post by: rajua99 on 07 Mar 2012 12:07:20 PM
Hello,

Is there any function that we can use to create current date Query Item  in Framework manager so that the customer can use that Query item in report studio instead of using Current date function in variables.

Thanks
Raju
Title: Re: Current Date
Post by: Lynn on 07 Mar 2012 01:56:56 PM
Did you try current_date?
Title: Re: Current Date
Post by: HalfBloodPrince on 14 Mar 2012 01:07:43 AM
Try This Function SYSDate()
Title: Re: Current Date
Post by: the6campbells on 29 Mar 2012 07:39:11 AM
Quote from: rajua99 on 07 Mar 2012 12:07:20 PM
Hello,

Is there any function that we can use to create current date Query Item  in Framework manager so that the customer can use that Query item in report studio instead of using Current date function in variables.

Thanks
Raju

The expression editor will show you CURRENT DATE, CURRENT TIME and CURRENT TIMESTAMP (These will translate to the RDBMS equivalent).
Older versions of the expression editor in Report Studio omit (bug) to show a tab (as you will see in FM) of possible #macro# functions and you will see there #macro# functions that provide a similar facility, various _add_.. macro functions and format controls etc.

Bear in mind, the ISO SQL for TIMESTAMPS/TIME provide for values with and without TIME ZONE. CURRENT TIME/TIMESTAMP are supposed to represent a value WITH a time zone (not all vendors support them) while LOCAL TIME/TIMESTAMP do not have a time zone.