Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to declare type data

Re: how to declare type data

From: <davide_at_yahoo.com>
Date: 6 Nov 2001 11:42:02 GMT
Message-ID: <9s8ia9$11lgm2$1@ID-18487.news.dfncis.de>


Sergio Cotti <sergiof31_at_hotmail.com> wrote:
> anydoby can tell me what can i do to declare a column of type "date"
> and use this format dd/mm/yyyy hh:mm ?

The type you want is DATE, see the documentation of Oracle about datatypes. To insert the data use

insert into <table> (...) values ( to_date(value,'DD/MM/YYYY HH:mm')...)

see about "to_date"
> How can i do to get the current date and time? i want to use this
> format: dd/mm/yyyy hh:mm.

select to_char(date_field,'DD/MM/YYYY HH:mm') from ...

see the documentation about TO_CHAR

> Thanks in advance and excuse me for my english.
> Daniele.

> --
> Posted from [213.156.38.68]
> via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Tue Nov 06 2001 - 05:42:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US