I am stuck on creating an object in universe that is pointing to Oracle. This objects is prompt for the date. I have created the object with following SQL but when I run the report, it throws an error Invalid number.
To_Date(To_Char(TRUNC(@Prompt(‘Please enter Run Date’,‘D’,mono,free), ‘MM’), ‘mm-dd-yyyy’))
If I input the date on the report, it will look like:
To_Date(To_Char(Trunc(‘02-04-2011 00:00:00’, ‘MM’),‘mm-dd-yyyy’)) And ‘02-04-2011 00:00:00’
@Uvee:
I dont know what you mean by locale of db, but when I use sysdate, the format it returns is DD-MON-YY and hence sysdate will work when it is used in the TRUNC function. However, since I have a prompt and the report inputs the date in ‘DD-MM-YYYY HH:MM:SS’ format, the TRUNC function does not work.
Sorry: forgot to mention that I am trying to get the First day of the month. Hence, I am using Trunc()