【问题标题】:Pass date variable to date parameter for scribe data migration job in powershell将日期变量传递给 powershell 中的 scribe 数据迁移作业的日期参数
【发布时间】:2017-10-21 17:42:57
【问题描述】:

我有以下powershell 脚本将$dateMinusThirty 变量作为参数传递给scribe 数据迁移作业:

$dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d; 

.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE($dateMinusThirty)" /RS 

日期是我需要的,Scribe 打开,但立即崩溃

我这样做对吗?

【问题讨论】:

    标签: powershell data-migration scribe-workbench


    【解决方案1】:

    正确的语法如下:

    $dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d; 
    
    .\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE(\""$dateMinusThirty\"")" /RS 
    

    【讨论】:

      猜你喜欢
      • 2019-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-11
      • 1970-01-01
      • 2018-12-11
      • 1970-01-01
      • 2015-01-14
      相关资源
      最近更新 更多