Unix Technical Forum

Current time in a procedure ??!!

This is a discussion on Current time in a procedure ??!! within the Informix forums, part of the Database Server Software category; --> Hi, i want to put a lot of trace (log time in a table) in some procedure. The function ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:16 PM
problems
 
Posts: n/a
Default Current time in a procedure ??!!


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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 07:16 PM
Jonathan Leffler
 
Posts: n/a
Default Re: Current time in a procedure ??!!

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/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 07:16 PM
rkusenet
 
Posts: n/a
Default Re: Current time in a procedure ??!!


"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 ;


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 07:17 PM
problems
 
Posts: n/a
Default Re: Current time in a procedure ??!!


those solutions don't work !



it seems that I can't have the current time in a statement even if I
call an other function. The current time stop at the begening of a
procedure. How can i get the OS time in an informix function ???


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:34 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com