Skip to content Skip to sidebar Skip to footer

Get am pm from datetime jQuery

Convert system time to am pm time:-
     Convert AM/PM from current system time, first get and store the current system time using Date() function and separate the hours and minutes from that, the minutes is less than 10 add 0 string with minutes and the hour is greater than or equal 12 then AM and 12 hours minus from the hours. Finally save all to a variable.



Example Program:- (Editor)



Output:-


Advertisement


Screen Shots:-


get system current time in am pm format using jquery

Post a Comment for "Get am pm from datetime jQuery"