Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date string to Oracle date datatype 1

Status
Not open for further replies.

LeoPascual

Technical User
May 23, 2002
5
US
I have variable that holds a date string looking like this: '05312002140059'
[The format is read as: 'mm/dd/yyyy hh24:mi:ss']. I need to execute a stored procedure
in Oracle through VB. The date string comes from a tab delimited text file, which is
read into a string variable in VB. From there, I want to assign the value in the
string varible to the Command object's parameters. The error that I'm getting is
that the string's datatype is mismatched or invalid with the stored procedure's
data type. What am I doing wrong?!
 
Use to_date('05312002140059',''mmddyyyyhh24miss'). This will convert the text to the proper date format for storage.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top