Oracle Business Intelligence Applications

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Issue while converting date time to date

Received Response
74
Views
1
Comments

Hi All,

I am kind of facing a wierd issue, In Analysis, I have created a simple query CAST('2014-12-15' As Date) while i run this i get the below error.

Query Failed:  [nQSError: 59140] The evaluation of the index 2 expression on row count -1 failed. [nQSError: 46046] Datetime value -12-15 does not match the specified format. (HY000)

But when i change the Query to CAST('2014/12/15' As Date) it dsiplays me the result 2014-12-15. I am not able to understand why is this happening.

I am using a presentation variable instead explict date in the query Query above which returns the value as 2014-12-15.

Could any one please help me resolving this.

Thanks

Answers

  • Hi,

    the default OBIEE string format for dates is different than your own session (assuming you didn't set a custom mask for that date column to show it like yyyy-mm-dd on screen).

    So you can just replace '-' with '/' on the value of your presentation variable and the CAST will work (using the OBIEE function to replace text)