How to add hour and format datetime in moment js

Ashif Avatar
var DprtforScn = new Date($("#DateOfService").val() + ' ' + $("#StartTime").val());
            //alert(DprtforScn);

            var mday = moment('11:28 PM','hh:mm a');
            mday.add(1, 'hours')
           
        //alert(mday.format('hh:mm a'));

            $('#EndTime').val(mday.format('hh:mm a'));

Leave a Reply

Your email address will not be published. Required fields are marked *