Re: Converting seconds into dates in a SELECT
Posted in 1999
Daniel Kirkdorffer <see.email.address@bottom.in.sig> wrote:
>
>
> Would anyone know of a way I can display a "date" value that has been
> stored in seconds since 1/1/1970 in a formated date format?
Stored procedure l2date from sysmaster is doing that.
...
{ Stored procedure for converting unix time() long to date }
create procedure l2date ( l int ) returning date; return trunc((l/86400) + 25568 );
end procedure;
grant execute on l2date to public;...
>
> I have a column that stores a date in seconds. I'd like to write a
> select statement that creates a displayed column that converts that
> data into a date.
So, you can write:
select sysmaster:l2date(your_column)
from your_table;
>
> Thanks,
>
> Dan
> --
> Daniel Kirkdorffer
> Sr. Consultant, Syllogistics, LLC.
> Email: dan.kirkdorffer 'at' syllogistics 'dot' com
> daniel.kirkdorffer 'at' attws 'dot' com
> Web: http://www.syllogistics.com/
> http://members.aol.com/dankirkd/
> Visual Cafe Tips:
> http://members.aol.com/dankirkd/vcafe.htm
>
--
Vardan Aroustamian
vaar@geocities.com