Oracle Forms has a true DATE field, which is a different type than the
database DATE type. In Forms, a field declared as DATE will truncate any
time portion. I.e. date only.
If you also want to display and edit the time portion of the value, use the
Forms DATETIME type for your field. This datatype will retain the time
portion of your data value.
I found this out the hard way, too.
--
Cordially,
Edward F Eaglehouse < [Email address protected] <mailto:[Email address protected] >
Automated Solutions Corp <http://www.atmsol.com/>
-----Original Message-----
From: Jonathan
[mailto:oracledba-ezmlmshield-x40272915.[Email address protected]
Sent: Wednesday, July 27, 2005 08:17
To: LazyDBA Discussion
Subject: RE: Forms6i date data type
Hello,
Are you looking at data in the DB and getting this result, or is this a
formatting issue?
An Oracle Date will always have a time element, though if not specified on
insert, will be set to 00000.
The scenario :date_field := sysdate; should never result in a time element
of 000000 unless:
- :date_field is not actually a date field
- it isn't being set to sysdate, rather being set to TRUNC(sysdate) (which
eliminates the time element, thereby resulting in an insert with a zero time
element.
Keep in mind that your NLS parameters in the registry for dates may have an
impact (e.g. NLS_DATE_FORMAT) on what is displayed (without applying a
format mask explicitly).
Also if you cast dates back and forth between DATE format and character
(e.g. using a TO_CHAR and then back using TO_DATE) you might lose the time
element if you don't specify it as part of the mask.
Jonathan Trifts
-----Original Message-----
Hi,
I got a confusion regarding date filed in forms 6i. Usually the field with
date data type saves time as well but sometime it start just saving 00000
instead time while the syntax of initializing this field is same.
:date_field := sysdate;
It will be appreciated if any one could clear the confusion.
Thanks!
*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else. In such case, you should destroy this
message and are asked to notify the sender by reply email.
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page