How to conver integer to time value

narayanan
narayanan Member Posts: 3
edited 2004-10-20 in Navision Attain
I want to convert a integer value to time value.... any suggestions please?

Comments

  • fb
    fb Member Posts: 246
    You can add an integer to a 'zero' time variable giving a time value that is 'integer' milliseconds after midnight...
    MyTime := 000000T +
      (intHours * 60 * 60 * 1000) +
      (intMinutes * 60 * 1000) +
      (intSeconds * 1000) +
      (intMilliseconds);
    
  • Draqos
    Draqos Member Posts: 36
    Declare time as Time and Inetger as Int.
    EVALUATE(time,STRSUBSTNO('%1',integer));
    
    After this, if integer was 112, time will be 11:02:00
    Hope this helps
    "Simplicity is the ultimate sophistication."
    Leonardo DaVinci