Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert military time to standard time javascript

function convert(input) {
    return moment(input, 'HH:mm:ss').format('h:mm:ss A');
}

console.log(convert('20:00:00'));
console.log(convert('08:00:00'));
console.log(convert('16:30:00'));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #military #time #standard #time #javascript
ADD COMMENT
Topic
Name
6+5 =