Current time in a procedure ??!!

Ask a Question related to Informix, Design and Development.

  1. #1

    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 [url]http://dbforums.com[/url]
    problems Guest

  2. Similar Questions and Discussions

    1. Outputting current time
      I output the current day/date on our web site home page. We recentlt moved to an american server that is 10 hours behing us in Australia. Whats the...
    2. Saving current date and time in ASP and ACCESS
      Hi all, Im developing a simple web page and Im new to ASP. I want to save the current date and time in my MS ACCESS table I have a field in...
    3. Current Time
      I need to show a current time in this mode ( 29.3 secondes ) how i do ?? I use this for show current time in this mode ( 29340 ) i don't know...
    4. How to change the current thread current culture at run time.
      I have created a new culture : Dim objCulture As New CultureInfo("he") //hebrew When I tried to assign it to the current thread. ...
    5. Current Date & Time
      I want to display the current date & time on my web site. Not being a code guru could someone please tell me what is the simplest script that works...
  3. #2

    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. [url]http://groups.google.com/[/url]

    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: [email]jleffler@earthlink.net[/email], [email]jleffler@us.ibm.com[/email]
    Guardian of DBD::Informix v2003.04 -- [url]http://dbi.perl.org/[/url]

    Jonathan Leffler Guest

  4. #3

    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 ;


    rkusenet Guest

  5. #4

    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 [url]http://dbforums.com[/url]
    problems Guest

  6. #5

    Default RE: Current time in a procedure ??!!



    You are wrong:

    select DBINFO('utc_to_datetime',sh_curtime)
    into end_time
    from sysmaster:'informix'.sysshmvals;

    works perfectly from SP, if 1 second accuracy is enough

    ------------------------------------------
    Alexey Sonkin
    Senior Database Administrator

    > -----Original Message-----
    > From: problems [mailto:member46368@dbforums.com]
    > Sent: Monday, November 03, 2003 10:30 AM
    > To: [email]informix-list@iiug.org[/email]
    > Subject: 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 [url]http://dbforums.com[/url]
    sending to informix-list
    Alexey Sonkin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139