getNowTime() { var date = new Date(); this.year = date.getFullYear(); this.month = date.getMonth() + 1; this.date = date.getDate(); this.hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(); this.minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); this.second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); this.milliSeconds = date.getMilliseconds(); var currentTime = this.year+'-'+this.month + '-' + this.date + ' ' + this.hour + ':' + this.minute + ':' + this.second + '.' + this.milliSeconds; return currentTime; },
相关文章
- 12-03js将时间戳转换为年月日时分秒
- 12-03C语言获取字符年月日时分秒毫秒
- 12-03js获取当前年月日时间
- 12-03记录一个JS快速获取年月日时分秒的写法
- 12-03TEST===>Sqlserver中获取年月日时分秒
- 12-03js获取年月日时分秒毫秒
- 12-03c语言获取当前年月日时分秒
- 12-03Date对象获取当前时间(年月日时分秒)
- 12-03获取当前时间(年月日时分秒)
- 12-03js中获取当天的时间的年月日