• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2173
  • Last Modified:

Cognos 8 variable

Hi

Are there any cognos experts that can tell me how to create a datetime variable in Cognos 8

Thanks
0
ac_davis2002
Asked:
ac_davis2002
  • 2
1 Solution
 
ac_davis2002Author Commented:
Thanks, I could really do with it!
0
 
RWrigleyCommented:
Cognos doesn't have "variables" in the same sense that they exist in programming.  Cognos has "Parameters" (which are text-based placeholders for prompted values), and "Conditional Variables", which are expressions evaluated at runtime to modify the presentation of the report.

You're probably looking to use a "parameter" here.  As I mentioned above, a parameter is text based, and is cast to the appropriate data type when it is put into the SQL.  That creates a bit of a prolbme if you're trying to display the parameter , becuase you can't format it.  

The solution to this is to create a data item in a query, and cast it to the appropriate database type.  The downside is that it has to get sent to the database.
0
 
ac_davis2002Author Commented:
Thanks RWrigley, I have raised a question about passing report prompts to a stored procedure if you have any thoughts

Thanks again for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now