Solved

Solve my Time stamp Problem in oracle

Posted on 2011-02-10
6
779 Views
Last Modified: 2013-12-19
Solve my Time stamp Problem in oracle

VALUES('1','1','1','1','1',TO_TIMESTAMP(TO_CHAR('02-02-2011 12:12:16','DD-MM-YYYY HH24:MI:SS')),

in time stamp it would provide invalid number

could you please give me the correct syntax in Timestam
0
Comment
6 Comments
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34868739
try this :

VALUES('1','1','1','1','1',TO_TIMESTAMP('02-02-2011 12:12:16.123456789','DD-MM-YYYY HH24:MI:SS.XFF'))

0
 
LVL 8

Author Comment

by:Manikandan Thiagarajan
ID: 34869932
please correct this one it would throw invalid number in time stamp format

INSERT INTO com_ebpp_bill_reg_hst
(EBR_LV_CODE_ST
,EBR_BILLER_CODE_ST,
EBR_BILL_UPLOAD_TYPE_ST,
EBR_PAY_PRES_FLAG_ST,
EBR_ACTIVE_STATUS_FLAG_ST,
EBR_BUS_DATE_DT,
EBR_MAKER_ID_ST,
EBR_MAKER_DATETIME_DT,
EBR_CHECKER_ID_ST,
EBR_CHECKER_DATETIME_DT,
EBR_CHANNEL_SOURCE_ST,
EBR_RECRD_STATUS_ST,
EBR_MAKER_REMARKS_ST,
EBR_CHECKER_REMARKS_ST,
EBR_WORK_BR_ID_DO)
VALUES('1','1','1','1','1',to_timestamp(TO_CHAR('12-01-2010 22:12:12' ,'DD-MM-RRRR HH24:MI:SS'),'DD-MM-RRRR  HH24:MI:SS')

,
'1',
sysdate,
'1',sysdate,'y','y','y','y',1)
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 34870299
Don't put to_char on a string

TO_CHAR('12-01-2010 22:12:12'

'12-01-2010 22:12:12'  is already a string
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 34870302
to_timestamp('12-01-2010 22:12:12','DD-MM-RRRR  HH24:MI:SS')
0
 
LVL 13

Expert Comment

by:agarwalrahul
ID: 34931687
Try this

VALUES('1','1','1','1','1',TO_DATE('02-02-2011 12:12:16','DD-MM-YYYY HH24:MI:SS'),
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34935560
did you try what i suggested ?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle 11g 23 107
selective queries 7 38
Create table from select - oracle 6 54
any step by steps guide on how to install Oracle 12c on Windows 10 8 63
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question