Title: RE: help needed in data datatype

Harvinder, insert it with the time.  See below.  Try your example with sysdate and you'll see what I mean.

16:33:03 (CRS.WORLD-CRS)>create table lisa (datetest date);

Table created.

16:33:10 (CRS.WORLD-CRS)>insert into lisa values (sysdate);

1 row created.

16:33:17 (CRS.WORLD-CRS)>/

1 row created.

16:33:18 (CRS.WORLD-CRS)>/

1 row created.

16:33:20 (CRS.WORLD-CRS)>insert into lisa values ('16-jun-01');

1 row created.

16:33:31 (CRS.WORLD-CRS)>commit;

Commit complete.

16:33:32 (CRS.WORLD-CRS)>select to_char(datetest,'dd-mon-yyyy hh24:Mi:ss') from lisa;

TO_CHAR(DATETEST,'DD-MON-YYYYHH24:MI:SS')
----------------------------------------------------------
03-jul-2001 16:33:20
03-jul-2001 16:33:21
03-jul-2001 16:33:22
16-jun-2001 00:00:00

16:33:45 (CRS.WORLD-CRS)>

    -----Original Message-----
    From:   Harvinder Singh [SMTP:[EMAIL PROTECTED]]
    Sent:   Tuesday, July 03, 2001 5:13 PM
    To:     Multiple recipients of list ORACLE-L
    Subject:        help needed in data datatype

    Hi,

    I have a table with colum defined as date datatype..for example

    create table dd(dd date);

    when we insert into this table like :

    insert into dd values('04-jul-01');

    when we do select as:

    select to_char(dd,'DD-MON-YYYY HH24:MI:SS') from dd;

    the result displayed is :

    TO_CHAR(DD,'DD-MON-Y

    --------------------------------------

    04-JUL-2002 00:00:00

    our application requires time to store as 23:59:59 and not as 00:00:00(midnight)....

    How can i make a check or apply some rule that whenever someone inserts into

    this column time always added as 23:59:59........

    Thanks

    Harvinder

Reply via email to