Re: WebDB - Date
Date: 2000/06/06
Message-ID: <8hiug2$er5$1_at_rohrpostix.uta4you.at>#1/1
On 06 Jun 2000, you wrote in comp.databases.oracle.tools:
>Hi
>
>I have a field of type date in a form. When retrieving/entering
>information into this field, only dates are presented. I need to present
>date and time in format hhmm dd/mm-yy. Please help.
>
>Stian Kaasa
Hi,
you have to possibilities to do so:
1.) you could enter the format hhmm dd/mm-yy in the Format mask of the date field;
2.) you can run a pl/sql procedure like this one in the pl/sql screen before the form appears.
procedure setdatefmt is
v_cursor number;
v_numrows number;
my_sql varchar2(200);
begin
v_cursor := dbms_sql.open_cursor;
my_sql := 'alter session set nls_date_format = '''||'hhmm dd/MM-YY'||'''';
dbms_sql.parse(v_cursor, my_sql, DBMS_SQL.native);
v_numrows := dbms_sql.execute(v_cursor);
dbms_sql.close_cursor(v_cursor);
end setdatefmt;
The second way is the better one i think, because it offers also a workaround of some problems with sorting of date - fields in a report. Hope the hint is useful!
by Martin Received on Tue Jun 06 2000 - 00:00:00 CEST
