On Tue, Jun 25, 2002 at 01:19:34PM -0400, Kipp, James wrote: > > > > What is the data type for the field into which you are > > inserting the date? > > If it's a DATE field, you do the formatting when you retrieve > > the value, > > not when you set it. If it's not a DATE field, it should be. > > the data type is 'date'. I wanted to format it as i insert because the field > is a key on 2 tables i will be querying on (so the date/time should be =)? i > guess the question would then be "how does oracle store the date" ? meaning > if it is formatted then stored, does oracle still store it like "6/25/2002 > 1:18:14 PM" anyway. >
The DATE datatype in Oracle is stored in a special internal format. (Specifically, it's a floating point number representing the number of days since some point in time.) As I said before, the formatting only comes into play when you retrieve the value, not when you store it. If you want to use the same date/time in two tables, you should select SysDate from Dual first, and insert that value into both tables. Ronald
