on 08-29-2014 5:05 AM
I have been trying to calculate days by using function daysbetween(date1,date2) in anlytical view where I have put date 1 as a column from a table and date 2 as input parameter. However, I am getting syntax error while validating the expression. Sometimes, it also pops with error like " date1 is not an attribute".
Could you please confirm if I am going right or missing somethng?
Regards,
Vikram Sharma
Hi Vikram, need to make sure the params are date type. I used something like this before :
daysbetween(date("ERDAT"), now())
where ERDAT is column of type NVARCHAR(8)
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
The datatype is date, initially it was NVARCHAR type but i wanna keep it to date type so i changed it.
However, the query that you have given will calculate days from current date, right?. I have one date as a column in a table and another date is from input parameter.
So I need to calculate days lapse between two specified dates in which i have been unsuccessfull so far..
Also, just for your info. when i used this date function in HANA SPS 07 it was working fine but don't know what happen now when I am using it in SPS08.
Regards,
Vikram
This comment is interesting: "Also, just for your info. when i used this date function in HANA SPS 07 it was working fine but don't know what happen now when I am using it in SPS08."
We're currently on SPS07 which works fine. You may want to log an incident with SAP support for this if your code was working on a previous version.
Peter
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.