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

How can I store time & date in a 'DAte' data type field? 1

Status
Not open for further replies.

bnath

IS-IT--Management
Apr 7, 2003
16
US
I am using VB6 with oracle 9i as back-end.

I am using the following code to update record which has a 'Date' data type (oracle) field. The update happens correctly, but how can I store even the time in the same field?

strSQL = "UPDATE xxx.AT_VRC_ADVANCES SET
strSQL = strSQL & " , AV_UPDATE_DATE = " & "to_date('" & Format(Now(), "DD-MMM-YYYY") & "', 'DD-Mon-YYYY')"

oRS.Open strSQL, cnn, adOpenForwardOnly, adLockPessimistic

thanks
nath
 
How about something like:
Code:
"to_date('" & Format(Now(), "DD-MMM-YYYY HH:MM:SS") & "', 'DD-Mon-YYYY HH24:MI:SS')"

Hope this helps


Harleyquinn

---------------------------------
For tsunami relief donations
 
Thank you. It works.

nath
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top