Solved

Solve my Time stamp Problem in oracle

Posted on 2011-02-10
6
782 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 9

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Import and exporting Oracle Data with encrypted columns 4 66
pivot rows to columns 1 58
Oracle DB Slows After Datapump Until Next Reboot 27 166
date show only hh:mm 2 47
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

740 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