简体   繁体   English

如何使用PowerShell将人类可读的时间戳转换为Unix时间戳?

[英]How to convert Human readable timestamp to Unix timestamp by using PowerShell?

I have a following csv file format, which contains some tool information and normal time. 我有以下csv文件格式,其中包含一些工具信息和正常时间。

"Tool","TimeRaised" "Abod","27-Jun-14 8:32:45 AM" "Test","27-Jun-14 8:30:42 AM" "Groupd","27-Jun-14 8:22:01 AM" "Tize","27-Jun-14 8:15:50 AM" "COrd","27-Jun-14 8:00:52 AM" “工具”,“ TimeRaised”,“居中”,“ 14年6月27日8:32:45”“测试”,“ 14年6月27日8:30:42 AM”“分组”,“ 27年6月27日” 14 8:22:01 AM“” Tize“,” 14-Jun-14 8:15:50 AM“” COrd“,” 14-Jun-14 8:00:52 AM“

I want to convert that normal time to Unix timestamp format by using PowerShell cmdlet. 我想通过使用PowerShell cmdlet将正常时间转换为Unix时间戳格式。 But I dont know which powershell cmdlet to use. 但是我不知道要使用哪个powershell cmdlet。

PS > Get-Date -date "27-Jun-14 8:00:52 AM" -UFormat %s
1403856052

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM