MongoDB/Date:修订间差异
来自康健生活
< MongoDB
| 第21行: | 第21行: | ||
(new Date().getTime() / 1000).toString(16);</syntaxhighlight>|<syntaxhighlight lang="bash"> | (new Date().getTime() / 1000).toString(16);</syntaxhighlight>|<syntaxhighlight lang="bash"> | ||
621ca8a6.afdf3c | 621ca8a6.afdf3c | ||
</syntaxhighlight>|>}} | |||
取整 | |||
{{Shc_out|<syntaxhighlight lang="javascript"> | |||
parseInt(new Date().getTime() / 1000).toString(16);</syntaxhighlight>|<syntaxhighlight lang="bash"> | |||
621ca98b | |||
</syntaxhighlight>|>}} | </syntaxhighlight>|>}} | ||
2022年2月28日 (一) 11:53的最新版本
Date
>
new Date();
ISODate("2022-02-28T10:35:41.246Z")
getTime
>
new Date().getTime();
1646044742621
十六进制
>
new Date().getTime().toString(16);
17f3fea9efd
标准时间戳
>
(new Date().getTime() / 1000).toString(16);
621ca8a6.afdf3c
取整
>
parseInt(new Date().getTime() / 1000).toString(16);
621ca98b
No categories