PowerShell - 将刻度转换为时间

标签 powershell

使用 PowerShell Get-Date 小程序将日期/时间转换为刻度很简单。但是,你如何做相反的操作;将刻度转换回日期和时间?

最佳答案

[DateTime]10000000000
Monday, January 01, 0001 12:16:40 AM

只需将数字转换为 DateTime . DateTime单参数构造函数采用 long作为刻度数。

关于PowerShell - 将刻度转换为时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1140576/

相关文章:

Powershell ..从网页中选择下拉菜单

windows - 获取文件夹及其子文件夹中最长文件路径的长度

powershell - get-or-create 的正确 PowerShell 动词/模式是什么?

regex - 在 PowerShell/PowerCLI 中将前缀附加到字符串

powershell - 如何在Powershell中设置schedule.service "Run whether user is logged on or not"?

Powershell 功能不起作用

powershell - 在 Powershell 中,有没有办法确保 #Requires -Modules 始终加载最新的更改?

powershell 获取文件的第一个 x MB

.net - 如何查找具有特定范围选项的所有变量?

哈希表的 Powershell 数组