Current time in a procedure ??!!
Posted in 2003
Topics: General Discussion
Hi, i want to put a lot of trace (log time in a table) in some procedure. The function "current" show the same time by statement. How can i get the real current time in a procedure ? please help me -- Posted via http://dbforums.com
problems wrote: > i want to put a lot of trace (log time in a table) in some procedure. > The function "current" show the same time by statement. How can i get > the real current time in a procedure ? Google is your friend. http://groups.google.com/ Suitable keywords: current time procedure Optional extras: dbinfo sysshmvals You can probably limit the date range to this year - certainly this century. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
"problems" <member46368@dbforums.com> wrote in message news:3540871.1067526000@dbforums.com...
>
> Hi,
>
> i want to put a lot of trace (log time in a table) in some procedure.
> The function "current" show the same time by statement. How can i get
> the real current time in a procedure ?
>
create this function in sysmaster database and use it in your SP.
create function fn_getcurrtime() returns datetime year to second
define cur_time datetime year to second; select DBINFO('utc_to_datetime',sh_curtime)
into cur_time
from sysmaster:sysshmvals;
return cur_time ;
end function ;
GRANT EXECUTE ON dba.fn_getcurrtime TO public ;