-
Get utc time
Hello!
I would want to get utc time in Asp.
I know how to do it with javascript, but i need it in asp.
Thanks!!!!!
-
-
RE:Get utc time
<script language="JScript" runat="server">
function GetUnixTime(strDate) {
if (strDate) {
return new Date(strDate).valueOf();
}
else {
return 0;
}
}
var serverdate=new Date();
</script>
This script will provide the server time and UTC time .
<html>
<body>
<p>
This timestamp for the UTC time
<%=GetUnixTime(serverdate.toUTCString())
%>
<br>
this UTC time
<%=serverdate.toUTCString()%>
</p>
</body>
</html>
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks