Nvarchar type to date conversion in SAP Hana

Hi

We are using BO 4.1 sp5 with Hana 10 as db. We have a view in hana with date field stored as Nvarchar. Tried converting it to date column

format(date(orderdate),“MM/dd/yyyy”) … when I verify the syntax it shows no errors. but when I preview the view in hana is shows an error

"Error: [303]: invalid DATE, TIME or TIMESTAMP value: search table error: [6931] attribute value is not a date or wrong syntax;Error executing physical plan: attribute value is not a date or wrong syntax;in executor::Executor in cube:

Any idea on how to fix it…

Thanks


rajx72 (BOB member since 2006-08-02)

Disclaimer: I’ve no experience with Hana’s syntax.

When I’ve been after something similar in SQL Server I prefer to use the database syntax over the universe functions.

If I have a varchar field that I want to display as a date object I’ll create a new date object and the select would be:

 cast(varchar.date as DATETIME) 

I’m guessing Hana has something similar.


bandage :uk: (BOB member since 2012-01-06)