Options

Converting to Integer?

tiagofrancistiagofrancis Member Posts: 48
How do i convert time to integer? Would it be miliseconds?

Answers

  • Options
    XypherXypher Member Posts: 297
    That would entirely depend on what you need the represented variation of time. You could convert time to minutes, seconds, milliseconds, etc
  • Options
    krikikriki Member, Moderator Posts: 9,090
    tim0Time := 000000T; //define tim0Time as TIME
    
    intMillisecondsAfterMidnight := TIME - tim0; // define intMillisecondsAfterMidnight as INT
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    I think you are aiming at this post http://www.mibuso.com/forum/viewtopic.php?t=27231.

    Create a new blank report. Define time1, time2 and time3 as DataType Time. Put the following code into the OnInitReport Trigger of the new report.
    time1 := 080000T;
    time2 := 093000T;
    time3 := 000000T + (time2 - time1);
    MESSAGE('%1',time3);
    
    Run the report.

    Think about this little example and you'll get your solution. :lol:
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.