【发布时间】:2016-10-24 11:38:28
【问题描述】:
我正在像这样显示当前日期、月份、日期、年份和时间
Mon Oct 24 2016 17:09:25 GMT+0530 (India Standard Time)
但我需要这样显示
Mon Oct 24 2016 17:09:25
我的 javascript 代码:
var timestamp = new Date();
editor.insertHtml( 'The current date and time is: ' + timestamp.toString());
我该怎么做,请谁能告诉我怎么做。
谢谢
【问题讨论】:
-
timestamp.toString().split('+')[0] -
你在哪里
timestamp.toString()将其替换为timestamp.toString().split('+')[0] -
嗨,
Mon Oct 24 2016 17:27:06 GMT是这样的,但我不需要显示GMT也请告诉我
标签: javascript asp.net