Appln: DesktopIntelligence
Version: BOXI-R2@SP2
DataProvider: Oracle 9i
OS : Windows 2000
When I use a date variable created by @prompt() function, it only accepts mm/dd/yyyy format.
With any other format the error that I get is:
Exception: DBD, ORA-01847: day of month must be between 1 and last day of month
State: N/A
My previously created reports were refreshed and saved with variables having dd-mmm-yyyy format.
The same reports are now not accepting dd-mmm-yyyy format.
The issue is same for both universe based and Free-hand-Sql based reports.
Some more investigation into it left me bewildered
@variable() function accepts dd-mmm-yyyy format.
Also, sql query runs in BO if I hard code a date in dd-mmm-yyyy.
e.g all the below queries run fine
select count(1) from table_xyz where column_date=@variable('Enter date') [ user input = 31-Jan-2008 or 31/01/2008 ]-works
select count(1) from table_xyz where column_date='31-Jan-2008' -works
select count(1) from table_xyz where column_date='31/01/2008' -works
BUT
select count(1) from table_xyz where column_date=@prompt('Enter date','D',,mono,free) [ user input = 01/31/2008 ]-works
any other format doesn't work. This is what I'm concerned about.
However,
select count(1) from table_xyz where column_date=@prompt('Enter date',D,,mono,free) [ user input = 31-Jan-2008 or 31/01/2008 ]
WORKS ??? HOW
just by removing single quotes around D in @prompt() function, it works for dd-mmm-yyyy format which is what I required (I don’t know should I be happy or should I cry)
but doesn’t work for mm/dd/yyyy format which it previously supported with D having single quotes around it …(who cares anyways )
I could have removed quotes around ‘D’ in all @prompts() variables in all universes but my collegues have no problem with same report.
i.e. For them, dd-mmm-yyyy is working for all functions and single-quotes around ‘D’ doesn’t make any difference.
So I thought better not to touch any universe and search for actual root cause.
I suspected my PC for regional settings.
I changed my Regional setting’s date format to dd-mmm-yyyy (both short and long) still no relief.
I know all this stuff sounds really confusing and wierd but it’s true.
Can somebody save my day please…
Regards,
JK
JK-BO (BOB member since 2008-03-20)