powershell - 在 powershell 字段中解析日期字符串
问题描述
我有这个字段数据,需要帮助才能从 wince 日志文件解析为正确的数据格式:
Import-Csv D:\svr\log_2021-0810_18-55-04_logcmd.txt -header Date,Ip,CMD,Command -Delimiter ':' | foreach {
$_.Date + " " + $_.CMD
}
Example Data:
599123178 10.10.10.2
599123468 10.10.10.2
599123846 10.10.10.2
599124189 10.10.10.2
我尝试使用 [DateTime]::Parse() 但无济于事。
解决方案
推荐阅读
- javascript - babel-plugin-angularjs-annotate 仅使用 AngularJS ^1.8.0 和 Webpack 中断一次服务注入
- angular - 角路由器子剂量渲染
- javascript - 为什么我的错误没有被捕获和处理?
- angular - 如何将此代码转换为使用异步?
- reactjs - package.json 依赖项中的打字稿
- android - 如何在我的屏幕指针中添加动画?
- java - 如何剪切 LocalDateTime 格式字符串以将年份从 4 位限制为 2 位?
- java - 错误的文件关联.java文件作为objectiveC
- laravel - 订阅者中的事件未触发
- javascript - 如何根据键在 React JS 中创建动态表?