baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from Randy M. on 2/27 2004, 18:37 +00:00

    Re: point of time comparision.


      this works , it gives the time between a given time and now time. thanks for your help, i tried to make it more complicated than it had to be. (the given time is -6:00 for CST + -6:00 for given time of 6am.)


      <perl>
      {
      out date("now", "Hour:Minute");
      }
      </perl>

      <perl>
      $given="12:00";
      {
      out date("now-$given", "Hour:Minute");
      }
      </perl>

    Your reply:

    Name: EMail: WWW:
    Subject:
    Text:
    Timezone:

    Post a new message


 All messages from this thread: To the list 
    Message from Randy M. on 2/25 2004, 14:37 +00:00

    point of time comparision.


      can the following be accomplished?

      output of "current time" minus "given time"

      Is this what needs to be done ?

       
      given "hour:minute"
      (date of "hour:minute" not important, does not need to be calculated)


      example of given "hour:minute"
      assign 06:00 (hour:minute),CST(-6:00) to variable S.


      then

      assign date("now-6:00","hour:minute") to variable N.

      out put varible N minus Varible S.

      thanks for your time and help.

     Post a reply

    Message from Christoph Bergmann on 2/26 2004, 03:27 +01:00
    EMail: info@baseportal.de

    Re: point of time comparision.


      You can get the result whithout assigning it to variables just with

      <perl>
      out date("now-06:00", "Hour:Minute");
      </perl>

      this works. ;-)

      Or do you need sth. else?

     Post a reply

    Message from Randy M. on 2/26 2004, 15:17 +00:00

    Re: point of time comparision.


      Thank you for your quick response, as always your on top of this. It is greatly appreciated.

      Yes this is part of what i need, but also need to take the current time minus a given time ,

      like : "now" it is 9:15 am - "given" it is 6:00 am, and get the result of "now" - "given" in this case it is
      2 hours 15 minutes.

      Thanks
      Randy
     Post a reply

    Message from Randy M. on 2/26 2004, 15:19 +00:00

    Re: point of time comparision.


      sorry : 3 hours 15 minutes.
     Post a reply

    Message from Christoph Bergmann on 2/27 2004, 09:43 +01:00
    EMail: info@baseportal.com

    Re: point of time comparision.


      I'm still not sure what exactly you want ;-)

      > take the current time minus a given time

      $given="03:00";
      out date("now-$given", "Hour:Minute");

      or do you want the result of $time1 - $time2 ? thats not possible with the "date" function. (it is possible if you program it yourself, but its not easy)

     Post a reply

    Message from Randy on 2/27 2004, 13:56 +00:00

    Re: point of time comparision.


      yes i would like to program it to computate:
      "now"time - "given" time. Please recommend
      a site or forum , do i need some sort of plug-in to work with time calculations for PERL?

      Thanks for your time and help.
     Post a reply

    Message from Randy M. on 2/27 2004, 18:37 +00:00

    Re: point of time comparision.


      this works , it gives the time between a given time and now time. thanks for your help, i tried to make it more complicated than it had to be. (the given time is -6:00 for CST + -6:00 for given time of 6am.)


      <perl>
      {
      out date("now", "Hour:Minute");
      }
      </perl>

      <perl>
      $given="12:00";
      {
      out date("now-$given", "Hour:Minute");
      }
      </perl>

     Post a reply
     

 Messages from 2700 to 2850: To the input form 
<< Newest messages | < Newer messages | To the input form | Older messages > | Oldest messages >>


Back to the homepage

© baseportal.com. All rights reserved. Terms of use



baseportal.com