使用powershell将字符串ISO 8601日期时间标准转换为SQL日期时间?

使用powershell将字符串ISO 8601日期时间标准转换为SQL日期时间?,powershell,datetime,Powershell,Datetime,$string='2015-10-14T14:43:55-04:00' 预期结果 $string='2015-10-1414:43:55' 在SQL中,字段为Nvarchar$string='2015-10-14T14:43:55-04:00' 获取日期-日期$string-格式“yyyy-MM-dd HH:MM:ss” 2015-10-14 14:43:55

$string='2015-10-14T14:43:55-04:00'

预期结果

$string='2015-10-1414:43:55'

在SQL中,字段为Nvarchar

$string='2015-10-14T14:43:55-04:00'
获取日期-日期$string-格式“yyyy-MM-dd HH:MM:ss”
2015-10-14 14:43:55