Re: Oracle 7.3 unix timestamp conversion
Date: Sat, 12 Dec 1998 16:47:58 GMT
Message-ID: <36779e0d.4181753_at_192.86.155.100>
A copy of this was sent to "den Engelsman, Stefan" <stefan.denengelsman_at_nl.origin-it.com> (if that email address didn't require changing) On Sat, 12 Dec 1998 11:33:06 +0100, you wrote:
>Hi all,
>
>I'm looking for a function within oracle which can convert a unix timestamp
>( number of seconds in GMT since 1970.01.01 00:00:00) into an Oracle date
>or time. Does any known if this already exists as a standard function ?
>
If you know your timezone, yes (else the new time derived would be in GMT as well)..
the following does C time into EDT.
...
time_t theTime;
varchar otime[50];
time(&theTime);
printf( "%s", ctime( &theTime ) );
EXEC SQL SELECT to_char(
new_time( to_date('01011970','ddmmyyyy') + 1/24/60/60 * :theTime, 'GMT', 'EDT' ), 'dd-mon-yyyy hh24:mi:ss' ) into :otime from dual;
...
>Stefan den Engelsman
>Origin
>Stefan.denEngelsman_at_nl.origin-it.com
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
-- http://govt.us.oracle.com/ -- downloadable utilities ---------------------------------------------------------------------------- Opinions are mine and do not necessarily reflect those of Oracle Corporation Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it.Received on Sat Dec 12 1998 - 17:47:58 CET