How to do the first date of the year in command
How to do the first date of the year in command
(OP)
I have a report that needs to be ran by schedule. So I need to set the time range to the first date of the year to the current date in Command. Here is what I am doing, but does not work in command:
register_date between date(year(currentdate),1,1) and sysdate
date(year(currentdate),1,1) works fine in the formula, show 1/1/2017. But does not work in command, Even I replace currentdate with sysdate, still got the error:
Failed to retrieve data from database. Detail: ORA-00936. Missing expression
How can I set the report run with the first day of the year in Command? Is it possible? Thank you very much for any help!!!
register_date between date(year(currentdate),1,1) and sysdate
date(year(currentdate),1,1) works fine in the formula, show 1/1/2017. But does not work in command, Even I replace currentdate with sysdate, still got the error:
Failed to retrieve data from database. Detail: ORA-00936. Missing expression
How can I set the report run with the first day of the year in Command? Is it possible? Thank you very much for any help!!!
RE: How to do the first date of the year in command
I figured it out.
In command, the query syntax should work for your database. Since my report runs against Oracle database, so I do the following and it works.
register_date between TRUNC(sysDate,'YEAR') and sysDate
Hope that will help anyone who has the same issue.
Thanks!
RE: How to do the first date of the year in command
For more information about using commands, go here: https://blogs.sap.com/2015/04/01/best-practices-wh...
-Dell
DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
www.decisionfirst.com