$datim value from server

Author: lalitpct@gmail.com (lalitpct)

$datim shows value of the client , is it possible to set it value from server.

5 Comments

  1. $datim Return the system date and time or convert the argument to the Datetime data type.

    SO if you want the info from a server, you have to execute on the server machine.

    ... what about execute a (self-contained) service remotely to get the $datim from a server.

    But I think there are better ways to get date-time information from external machines..

    Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Actually this we are lookign for existing application ..so we need to change everywhere where $datim is used  to self contained service.

    I thought there are some setup where we can do that ..problem is forms are called form server but $datim is taking value from indivisual machines


    Author: lalitpct (lalitpct@gmail.com)
  3. Hi,

    We have done this step-wise

    1. we have introduced an INCLUDE-PROC with a function GetSysDate() -> returns ($datim)
    2. This include we added in every LPM-Trigger (by using an own form which runs through the repository),
    3. Exported all Source-Code and look for $datim without an expression (e.g. => $datim and not $datim(field).,
    4. Replace $datim by function call with an Editor using RegExp, same to $date and maybe $clock
    5. (Of course Step 4 can also done in an own repository form).

    For Step 2 and 5 of course you have to distintc between inheritance, empty or variations of Trigger.

    The Include Proc starts a service, and get the sysdate either on the server or by reading it from the database (ORA: select...from dual).

    HTH

    Thomas


    Author: Thomas.Young (thomas.young@young-consulting.de)
  4. in fact, you do not have to do that, it's just a mater of refactoring.

    All you need is a procedure returning the datetime as $datim does; lt's call it my_datim

    Now go through all your sourcecode replacing "$datim" with "my_datim()".

    One option is to use a global export of your application as XML in a whatsoever editor.

    And you have to make this procedure available to forms, services, etc.

    That's all fffolks, Uli

    P.S: I recommend Thomas Youngs suggestion using the database to return that date-time value.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  5. You can use SQL to get the server datetime from the RDBMS server

    for example, using Oracle as the default RDBMS, something like:

    sql "SELECT TO_CHAR(SYSDATE, 'MM/DD/YYYY HH:MM:SS') FROM DUAL","$DEF"

    will return the value in $result.


    Author: KevinMcKeever (kevin.mckeever@gmail.com)