From: Martin.Amer@web.de (Martin Amerhauser)
Subject: Re: WebDB - Date
Date: 2000/06/06
Message-ID: <8hiug2$er5$1@rohrpostix.uta4you.at>#1/1
References: <Aw3%4.20673$C9.393666@news1.online.no>
X-Complaints-To: news-admin@utanet.at
X-Trace: rohrpostix.uta4you.at 960298306 15205 195.70.229.204 (6 Jun 2000 13:31:46 GMT)
Organization: UTANET Newsserver
User-Agent: Xnews/03.03.12
NNTP-Posting-Date: 6 Jun 2000 13:31:46 GMT
Newsgroups: comp.databases.oracle.tools



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


