title: How to get creation date in sitecore with powershell
body: <p>I wrote a script in order to replace the <code>"$date"</code> in  release date of many Sitecore items with their creation date (<code>created</code>).</p>
  
  <p>I have a problem to get this field from Sitecore. </p>
  
  <p>I tried this:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$rootItem = Get-Item master:/content
  $sourceTemplate = Get-Item "/sitecore/content/.../item 1"
  foreach($field in $sourceTemplate.Fields) {
      if (($field -ne $null) -And ($field -like '$date')) {
          $sourceTemplate.Editing.BeginEdit()
          $CreatedDate = .......
          $field.Value = [sitecore.dateutil]::ToIsoDate($CreatedDate)
          $sourceTemplate.Editing.EndEdit()
      }
  }
  </code></pre>
  
  <p>I also tried to get this field by <code>ID</code> but it doesn't work. </p>
  
  <p>Does someone have an idea please?
  Thank you</p>