I have written as per your needs. If you want to set the time as always 12:00 PM, you can just add it as hard code string. In following code, I have displayed current time instead of hard code ' 12:00 PM'. By default JavaScript will return in 24 Hrs format and I manipulated to display in 12 Hrs format. Following is my sample code: