I have following code to get current uct time and time from json API and see the output it shows in comments section of the code.I want to display both the times in the following form (DD/MM/YYYY HH:MM AM/PM) for example 15/08/2013 10.43 AM .Please let me know which plugin to use and also code changes needed.
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/json2.js" type="text/javascript"></script>
<script src="Scripts/json.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
//current UTC Time displays output as 15/8/2013 10:43:51 not showing AM or PM
var currentutctime = new Date();
var formatdate = currentutctime.getUTCDate() + '/' + (currentutctime.getUTCMonth() + 1) + '/' + currentutctime.getUTCFullYear() + ' ' + currentutctime.getUTCHours() + ':' + currentutctime.getUTCMinutes() + ':' + currentutctime.getUTCSeconds();
$('#lblutctime').text(formatdate)
//JSON API Time displays output as August 15,2013 10:42:59 GMT+0100 , not showing AM or PM
$.ajax({
url: 'http://timeapi.org/utc/now.json',
dataType: 'jsonp'
})
.done(function (response) {
$('#lblntp').text(response.dateString);
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="lblutctime" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lblntp" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>