Home » SQL & PL/SQL » SQL & PL/SQL » datetime in 10 g
datetime in 10 g [message #211542] Fri, 29 December 2006 05:28 Go to next message
theusser
Messages: 3
Registered: December 2006
Location: Switzerland
Junior Member
Hallo,

what fieldtype to use for datetime? I think, in older versions we had the "DateTime"-Type, isn't it? Now i find only date and the following Statement saves only the date without the time ...

update indexqueue set indexdate = TO_DATE('2006.12.29 12:06:00','YYYY.MM.DD HH24:MI:SS' where id =1

(Tried in Oracle Developer and Toad)

Thomas
Re: datetime in 10 g [message #211544 is a reply to message #211542] Fri, 29 December 2006 05:33 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
hi,

 are you sure.try this

alter session set nls_date_format='DD-MM-YYYY HH24:MI:SS'
/

select indexdate from indexqueue
/




regards,

[Updated on: Fri, 29 December 2006 05:33]

Report message to a moderator

Re: datetime in 10 g [message #211546 is a reply to message #211544] Fri, 29 December 2006 05:43 Go to previous messageGo to next message
theusser
Messages: 3
Registered: December 2006
Location: Switzerland
Junior Member
Hallo,

thanks, that's it, but what does it ...?

alter session set nls_date_format='DD-MM-YYYY HH24:MI:SS'

How long does it work now (what is a session in oracle)? Do i need to ask admin to change some settings so it works forever?

Thomas
Re: datetime in 10 g [message #211550 is a reply to message #211546] Fri, 29 December 2006 06:01 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, there was no DATETIME datatype in Oracle. You could set it in Oracle Forms Builder (as noted in your cross-posted message, but not as a column datatype.

DATETIME, in Forms Builder, contains date + time. It refers to a DATE column in a table.
DATE, on the other hand, in Forms Builder contains only date.

[EDIT] Saying that ALTER SESSION lasts for a session, it means that this will be valid until you log off.

Perhaps you would find it useful to read Oracle documentation.

[Updated on: Fri, 29 December 2006 06:03]

Report message to a moderator

Previous Topic: PL/SQL CODE
Next Topic: Inserting record into PL/SQL Tables
Goto Forum:
  


Current Time: Tue Dec 06 14:24:06 CST 2016

Total time taken to generate the page: 0.15462 seconds