[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

SV: Using the edit mask for date fields on Oracle



Hi Anders,

you have to convert the date in the select statement
try this

begin-select
to_char(faildate,'yyyy-mm-dd hh:mi')   (,10)

to_char(statusdate,'yyyy-mm-dd hh:mi')
      print     &statusdate    (,27)

If you are a MAXIMO user you could look at the standard reports.
There you could find some useful hints when it comes to converting dates.

Frank Severinsson
PSDI Norden AB


----------
> Från: Anders Eriksson <anders.eriksson@TELE2.SE>
> Till: Multiple recipients of list SQR-USERS <SQR-USERS@LIST.IEX.NET>
> Ämne: Using the edit mask for date fields on Oracle
> Datum:  den 6 juli 1998 19:11
>
> 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