Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么在Powershell中使用UFormat进行转换时会出现语法错误_Powershell - Fatal编程技术网

为什么在Powershell中使用UFormat进行转换时会出现语法错误

为什么在Powershell中使用UFormat进行转换时会出现语法错误,powershell,Powershell,为什么我不能将此日期转换为Unix日期时间:我的 ([DateTime]"2015.08.24 09:10") -UFormat %s 正确的语法是什么?UFormat是Get Date的cmdlet参数,而不是独立的运算符。试试这个: Get-Date '2015.08.24 09:10' -UFormat %s UFormat是Get Date的cmdlet参数,而不是独立的运算符。试试这个: Get-Date '2015.08.24 09:10' -UFormat %s

为什么我不能将此日期转换为Unix日期时间:我的

([DateTime]"2015.08.24 09:10") -UFormat %s

正确的语法是什么?

UFormat
Get Date
的cmdlet参数,而不是独立的运算符。试试这个:

 Get-Date '2015.08.24 09:10' -UFormat %s

UFormat
Get Date
的cmdlet参数,而不是独立的运算符。试试这个:

 Get-Date '2015.08.24 09:10' -UFormat %s