Saturday, May 2, 2020

Convert Seconds to hours and minutes(hh:mm:ss) using apex in salesforce

Sample Code
Integer seconds = 7249;
System.debug('Converted format => '+DateTime.valueOf(seconds*1000).formatGMT('HH:mm:ss'));

Output

No comments:

Post a Comment