Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 powershell 获取当前系统日期格式,例如,如果我正在使用 powershell 读取日志文件,我想知道 2012-03-01 是 yyyy-mm-dd 还是 yyyy-dd-mm。
这应该为您提供机器当前文化的 DateTime 格式:
[cultureinfo]::CurrentCulture.DateTimeFormat