How to display duration in hours like 3.5 in nav 2017 pages

krishnamkkrishnamk Member Posts: 27
Dear Friends,

can you help me to How to display duration in hours like 3.5 in nav 2017 pages. It is showing in milliseconds.
I want 3.5. or 3:30 like ..

Please help

Warm regards
KMK

Answers

  • diwakar_ghoshdiwakar_ghosh Member Posts: 11
    Hi KMK,

    Check this example :
    Name DataType
    DateTime1 DateTime
    DateTime2 DateTime
    Duration Duration
    Hours Decimal

    DateTime1 := CREATEDATETIME(090517D, 120000T); //09-May-2017 12:00 PM
    DateTime2 := CREATEDATETIME(090517D, 153000T); //09-May-2017 03:30 PM
    Duration := DateTime2 - DateTime1;
    Hours := Duration/3600000;
    MESSAGE('Duration = %1 , Duration in Hrs = %2',Duration,Hours);

    Regards,
    Diwakar
Sign In or Register to comment.