Re: SQL*REPORT &SQL to_char(: date_variable
Date: Mon, 13 Sep 1993 22:37:02 GMT
Message-ID: <1993Sep13.223702.10540_at_atlas.com>
I am trying to convert a date field in sql*report to a specific format.
In one of my QUERIES I select date_variable from table.
Then in my Fields I have
date_variable date MM/DD/YY
I want to print that date in a format that is to be determined at run time.
In testiing this I find that if, in Fields, I have
field_name source
output_form &SQL SELECT :date_variable into output_form from dual
the result is output in 1993mmdd format.
changing the &SQL to
select to_char(:date_variable) into output_form from dual
produces the same.
changing to
select to_char(:date_variable,'MM/DD/YY') into output_form from dual produces ORACLE error 1481 "invalid TO_CHAR format string!
I'm really stumped! any suggestions?
I want to have in PARMS
date_format (default) 'MM/DD/YY'
and would then have the sql above as
select to_char(:date_variable,:date_format) into ....
output_form is defined as CHAR.
Thanks in advance.
-- Bruce Arbuckle EMAIL: brucea_at_atlastele.comReceived on Tue Sep 14 1993 - 00:37:02 CEST