Forum Discussion

Adagio's avatar
Adagio
Frequent Contributor
7 years ago

convert 24 hr clock time to 12 hr clock time

Hello,   I've to convert the time stamps based on 24hr clock ro 12 hr clock. For example - 1/4/2018 13:09:52   needs to be converted to 1/4/2018 1:09:52.    Is there any built-in feature that I ...
  • shankar_r's avatar
    shankar_r
    7 years ago

    As tristaanogre said, you can those methods to generate whatever format you want,

     

    I'm just giving an example for your requirement,

     

    var dateValue = aqConvert.StrToDate("1/4/2018 13:09:52");
    Log.Message(aqConvert.DateTimeTpFormatStr(dateValue,%d-%b-%Y %I:%M:%S %p));
    
    01-Apr-2018 1:09:52 will get printed