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