开发者

JavaScript date format accepted by the date value returned from C#

Any one help to to get the extact value from the JavaScript date time开发者_如何学C utc format. I am using a C# web method which is returning a date and I have to set that date with Timezone.

Thanks


Please check the code below:

<script language="javascript">
ourDate = new Date();
document.write("The time and date at your computer's location is: "
+ ourDate.toLocaleString()
+ ".<br/>");
document.write("The time zone offset between local time and GMT is "
+ ourDate.getTimezoneOffset()
+ " minutes.<br/>");
document.write("The time and date (GMT) is: "
+ ourDate.toGMTString()
+ ".<br/>");
</script>

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜