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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: RE: JAVA TIMESTAMP

Re: RE: JAVA TIMESTAMP

From: anysql <anysql_at_gmail.com>
Date: Thu, 20 Sep 2007 19:00:58 +0800
Message-ID: <200709201900445319643@gmail.com>


Hi :

1, to_number(to_char(timestamp_col, 'dd'))

SQL> select to_number(to_char(current_timestamp, 'dd')) from dual;

TO_NUMBER(TO_CHAR(CURRENT_TIMESTAMP,'DD'))


                                        20

2, extract(day from timestamp_col)

SQL> select extract(day from current_timestamp) from dual;

EXTRACT(DAYFROMCURRENT_TIMESTAMP)


                               20

Is it what you want?

Thanks.

Good tools make work easy and improve life quality
-- http://www.dbatools.net

Personal software, life, research and professional Oracle recovery service
-- http://www.anysql.net/en

From£º John Hallas
Sent£º 2007-09-20 18:49:36
To£º oracle.tutorials_at_gmail.com; oracle-l_at_freelists.org CC£º
Subject£º RE: JAVA TIMESTAMP
Does this page help Deepak  

http://download-uk.oracle.com/otn_hosted_doc/jdeveloper/904preview/jdbc-javadoc/oracle/sql/TIMESTAMP.html  

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of DBA Deepak Sent: 20 September 2007 11:14
To: oracle-l
Subject: JAVA TIMESTAMP  

Hi Experts,  

Is there any built-in SQL function which can convert JAVA Timestamp to Oracle TIMESTAMP data type. I need this to partition a table based on the TIMESTAMP(JAVA TIMESTAMP). I want to partition based on the DAY OF THE MONTH part of the Timestamp.  

Any help on this is highly appreciated.

--

Regards,

Deepak
Oracle DBA

BJSS Limited, 1st Floor Coronet House, Queen Street, Leeds LS1 2TW. Registered in England with company number 2777575. http://www.bjss.co.uk

--

http://www.freelists.org/webpage/oracle-l Received on Thu Sep 20 2007 - 06:00:58 CDT

Original text of this message

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