本文介绍了有没有办法使用Windows命令获取时代?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法使用Windows命令获取时代?如果没有,可以修改 date 和时间命令输出吗?
例如, date 在Windows中给出带有/等的日期。我想获得一个没有特殊字符的输出,例如/:
解决方案要获得yyyymmdd格式的时间,请尝试:
for / Ftokens = 2-4 delims = /%i in('date / t')do echo%k%i%j / pre>更多:
www.sprint.au/~terbut/usefulbox/msdoscmds.htm
Is there a way to get epoch time using a Windows command? If not, can the date and time commands output be modified?
For example date in Windows gives the date with / etc. I would like to get an output that has no special characters such as / :
解决方案To get time in the "yyyymmdd" format, try this:
for /F "tokens=2-4 delims=/ " %i in ('date /t') do echo %k%i%jMore on:
www.sprint.au/~terbut/usefulbox/msdoscmds.htm
更多推荐
有没有办法使用Windows命令获取时代?
发布评论