Hello,
I am trying to create a date object in a universe from “fiscal month” field and a “fiscal year” field.
I can successfully create a date if I select a day 1 through 28, but i would like to choose the last day of the month, and i can’t get the last_day function in Oracle 10g to work.
This is the select statement that works, but only for days 1 - 28,
When I try to display a list of values, it says that date is the wrong data type, i tried all the data types and none of them worked. When I tried to make a report, it said invalid date.
Fiscal Month and Fiscal Year are both numbers. The values are:
Year:
2008, 2009, 2010
AND
Month:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
The to_date function works either way using ‘MMDDYYYY’ or 'MM/DD/YYYY, it is the Last_day function that is causing me problems.
It is strange becuase it parses fine, but thows the “Error during SQL executionL (DA0003)”, & “Exception: DBD, ORA-01843: not a valid month
State: N/A” when trying to display values, or run a report.
This is the formula I am having problems with:
last_day(to_date(@Select(Tfacr200\Fiscal Month) ||‘28’|| @Select(Tfacr200\Fiscal Year),‘MM/DD/YYYY’))