[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



Anders...

I tried this a while ago.
Date EDITing does not work with Oracle with the print statement.
Refer to page 263 of SQR manual (we have version 3).

The only work around was to use the To_Char function
ie.

begin-select
to_char(Status_Date, 'yyyy-mm-dd hh24:mi:ss')      &Print_Date      ! or
any equivalent format u require
     print    &Print_Date (,27)


Cheers

Arthur Coniglio
Education Departmen of Western Australia


> -----Original Message-----
> From: Anders Eriksson [SMTP:anders.eriksson@TELE2.SE]
> Sent: Tuesday, July 07, 1998 1:12 AM
> To:   Multiple recipients of list SQR-USERS
> Subject:      Using the edit mask for date fields on Oracle
>
> 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