title: Get datetime during deploy in YAML file
body: <p>I need to get DateTime during the deployment in a YAML file. The DateTime should be shown as</p>
  <pre><code>&quot;startTime&quot;: &quot;2017-12-08T00:00:00&quot;
  </code></pre>
  <p>I found <a href="https://stackoverflow.com/a/23529410/2688419">this</a> help. but I need to follow the exact Datetime format. I wonder if anyone can help in this case?</p>
  <p>-- Added --</p>
  <p>I work on deploying Data Factory by YAML file. This StartTime will be DateTime for the trigger part of Data Factory pipeline</p>
  <p>I have update my build pipeline with a variable, build.yml</p>
  <pre><code>variables:
    deployDate: $(Get-Date -Format &quot;YYYYMMDDThhmmssZ&quot;)
  </code></pre>
  <p>and inside my deploy.yml file</p>
  <pre><code> - task: AzureResourceGroupDeployment@2
        displayName: &quot;Deploy Azure Data Factory Content&quot;
            inputs:
              azureSubscription: ...
              action: ...
              resourceGroupName: ..
              location: ...
              templateLocation: ...
              csmFile: ...
              csmParametersFile: ...
              overrideParameters: &gt;-
                - ...
                -triggerStartTime &quot;$(deployDate)&quot;
              deploymentMode: 'Incremental'
  </code></pre>
  <p>and in adf.content.json, I added</p>
  <pre><code>&quot;parameters&quot;: {
      &quot;triggerStartTime&quot;: {
      &quot;type&quot;: &quot;string&quot;
    }
  }
  
  
  
  &quot;name&quot;: &quot;[concat(parameters('factoryName'), '/Trigger')]&quot;,
      &quot;type&quot;: &quot;Microsoft.DataFactory/factories/triggers&quot;,
      &quot;apiVersion&quot;: &quot;...&quot;,
      &quot;properties&quot;: {
        &quot;annotations&quot;: [],
        &quot;runtimeState&quot;: &quot;Started&quot;,
        &quot;pipeline&quot;: {
          &quot;pipelineReference&quot;: {
            &quot;referenceName&quot;: &quot;...&quot;,
            &quot;type&quot;: &quot;PipelineReference&quot;
          },
          &quot;parameters&quot;: {}
        },
        &quot;type&quot;: &quot;TumblingWindowTrigger&quot;,
        &quot;typeProperties&quot;: {
          &quot;frequency&quot;: &quot;Hour&quot;,
          &quot;interval&quot;: 1,
          &quot;startTime&quot;: &quot;[parameters('triggerStartTime')]&quot;,
          &quot;delay&quot;: &quot;00:00:00&quot;,
          &quot;maxConcurrency&quot;: 50,
          &quot;retryPolicy&quot;: {
            &quot;intervalInSeconds&quot;: 30
          },
          &quot;dependsOn&quot;: []
        }
      },
      &quot;dependsOn&quot;: [
        &quot;[concat(variables('factoryId'), '/pipelines/...')]&quot;
      ]
  </code></pre>