[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Using the edit mask for date fields on Oracle
You might want to check out the oracle "set-nls-date-format" command (I
dont have the books here with me at the moment). You can call this in a
BEGIN-SQL section in an include file and simply include that file in all
your programs ( and can #ifdef sections for each database type if you want
to get fancy). This command alters the default format that oracle will
return dates in and will also affect any string date comparisons.
HTH,
Don
On Mon, 6 Jul 1998, Anders Eriksson wrote:
> Hello!
>
> I have a problem. I am tying to convert a large number of reports frm
> SQLBase to Oracle
> and I can't get the formating of date formats on Oracle to work. I have the
> folowing code:
>
> begin-select
> faildate (,10) edit 'yyyy-mm-dd hh:mi' ! Won't work
> statusdate
> print &statusdate (,27) edit 'yyyy-mm-dd hh:mi' ! Will
> not work either
> ....
>
> When executing this code on the Oracle database i get the edit string
> yyyy-mm-dd hh:mi
> insted of the formated date. Since I am going to convert a large number
> of reports I would like to avoid to rewrite every line where dates are
> formated to:
>
> to_char( faildate, {d_DateTimeMask} ) (,10)
> to_char( statusdate, {d_DateTimeMask} ) (,27)
>
> As far as I have understod it should be possible to use the edit comand for
> date fields for Oracle
> databases as well.
>
> I am using:
> Windows 95 and NT Clients
> SQR 3.0.13.2 for PC/Windows
> Oracle 7.3
>
> Regards
> Anders Eriksson
>
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which exploded"