Is it possible to display Machine Time in 12 Hrs. Format?

Discussion in 'Knowledge Base' started by admin, Jun 3, 2015.

         
  1. admin

    admin Administrator Staff Member


    Query

    Is it possible to display Machine Time in 12 Hrs. Format?

    Solution

    Yes, it is possible by writing a User Defined Function.


    Following are the steps:


    1. Get the Machine Time using $$SysInfo:SystemTime,

    2. Separate the Hours and Minutes using the Function StringPart or Looping Construct within User Defined Function For Token

    3. Calculate the Hours by subtracting the hours by 12 if Hour value is greater than 12.

    4. Display the above Hour Value and Minutes as it is
     


Share This Page