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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update SIPS_TRANS set end_time='21/11/01 22:42:00'

Status
Not open for further replies.

Palmero

Technical User
Mar 31, 2001
53
0
0
FR
Hi all,
I wanted to know how to insert the value of VB6 now function in an Oracle V8i date field.

I have the execution error : 40002
S1000:[Oracle][ODBC][Ora]ORA-01830

Hereafter is the query in VB :
Update SIPS_TRANS set end_time='21/11/01 22:42:00'

Thanks in advance for your collaboration.

Palmero
 
You should be able to replace the time in your update statement with the Now() function:

"Update SIPS_TRANS set end_time='" & Now() & "'"

Hope that works. -Chris Didion
Matrix Automation, MCP
 
You can also use an Oracle function like this:
[tab]Update SIPS_TRANS set end_time=SYSDATE;

I think you'll be OK when you select it, but if not, you can use:
[tab]SELECT TO_CHAR(end_time, 'MM-DD-YYYY HH24:MI:SS')"end_time" FROM SIPS_TRANS;

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top