Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> How do you pass C time_t datetime to Oracle?
I am writing my first C++ UNIX program that uses an Oracle database.
I am writing the middle tier componet and am having trouble with
datetime values.
.
I will be passed a time_t and must return a time time_t. I am not
able to get the time_t into the database as a DATE or select a
date/time and covert it to the time_t.
Can I insert this format into Oracle directly? I could not find this format for the TO_DATE function.
How do you handle this?
I have written a couple functions to do the conversions using a variety of methods and seem to be off because of time zones. I would think that this is a common task and should be relativly easy.
This time_t variable comes from a windows system where the time is actually an unsigned long that is the number of seconds from Jan. 1, 1970 00:00:00. In the middle tier I am using Pro*C/C++. Does pro C provide a conversion for this?
Thanks,
Don chambers_at_inquiregroup.comReceived on Sun Apr 30 2000 - 00:00:00 CDT