Categories
- All Categories
- 139 Oracle Analytics News
- 25 Oracle Analytics Videos
- 14.6K Oracle Analytics Forums
- 5.6K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 52 Oracle Analytics Trainings
- 9 Oracle Analytics Data Visualizations Challenge
- 4 Oracle Analytics Career
- 2 Oracle Analytics Industry
- Find Partners
- For Partners
Cast a ServerVariable as Date in Dashboard

Hi,
I am using a ServerVariable in my reports to present today's date.
When I call it in a report it works fine and uses the data type that the database column has:
------>
But I also want to call the variable in a section title in my dashboard. When I try to do this I get a different type, the one that oracle supports.
------------->
I checked through the session manager in the online RPD and the type for this variable is LONGVARCHAR giving back this TIMESTAMP string. This also creates some other issues when I link through reports.
I tried to change the default initializer to DATE but didn't help. I also tried to change the SQL in my initialization block and cast as date but again nothing happened.
Is there any way that I can cast this as DATE so I can just see the date and not the hour?
Thanks
Answers
-
Why don't you simple TO_DATE the column in your SELECT statement of your initialisation block for the curr_date_RT session variable? It's being treated as a string because it is a string and not a date
0 -
Yes I know it's a string (I don't know why though), so I am trying to figure out how to change it to a date format so it works in my dashboard.
I changed the select statement in the initialization block using the TO_DATE function but still when I test the value of the variable remains the same
0 -
Is it listed as a DATETIME type when you check the session manager in the Admin Tool?
0 -
No, as I mentioned the type in the Session Manager is LONGVARCHAR. To clarify, this is a Dynamic Repository variable and not a Session one.
0 -
Try something like:
'Today - '||CAST(CAST (VALUEOF(NQ_SESSION.curr_date_RT) AS DATE) AS CHAR(10))
0 -
Hi,
Try this..
Create repositiory initialization block (SELECT TO_CHAR(SYSDATE,'DD-MM-YYYY') FROM DUAL;) and dynamic variable accordingly.
Hope this helps..!
Regards,
Yaswanth
0 -
None of these commands is being recognised in the Titles.
For a biServer variable (have to mention again my variable is not a Session one but a Repository one) tthe right syntax to call in a title is @{biServer.variables[‘variablename’]} and no other command can be combined with that (I tried cast and a lot other options, so this is an assumption, if you have found something that works I will be glad to let me know)
This is why I am trying to find a way to set this variable as date in the first place
0 -
Venkata Yaswanth Ramisetty I will try this, thanks
0 -
For a repository variable:
'Today - '||CAST(VALUEOF("curr_date_RT") AS CHAR(10))
0 -
Joel Acha No, Unfortunately none of these commands that work fine in Answers seem to work in the Section titles
0