Re: converting date_time to seconds
Posted in 1996
On 21 Nov 1996 02:39:56 GMT, aem@cyberhighway.net (Art Mills) wrote:
>how can I convert date_time to full seconds
>this is basicly what I am trying to do
>
>unload to filename>select EXTEND("1996-11-20 18:27:07",YEAR TO SECOND)-date_time",login,........
>
>
>But I nead the answer in seconds differnt not in YEAR TO SECOND format
>
>
>example if date_time has "1996-11-20 18:25:07"
>the unload would look like
>120|aem|..................
Try to use stored procedure.
CREATE PROCEDURE int_in_sec()
RETURNING INTERVAL SECOND(9) TO SECOND;
DEFINE int_sec INTERVAL SECOND(9) TO SECOND;
LET int_sec = select EXTEND("1996-11-20 18:27:07",YEAR TO
SECOND)-date_time FROM ...;
RETURN int_sec;
END PROCEDURE
Hope this helps
Oleg Tretyakov
tov@inist.ru