如何在mongo shell 中输出格式化时间?

在mogno shell中输出当前格式化的时间,不要
MongoDB Enterprise > 执行相关的命令或js文件,(输出系统当前时间,并格式化)
MongoDB Enterprise > 17:35:24
。。。。。
MongoDB Enterprise > 17:36:00
。。。。。
不要有过多的内容,只显示系统当前时间(hh:mm:ss)

第1个回答  2020-05-08

(new Date()).toLocaleTimeString("en-US")

本回答被提问者采纳
相似回答