Answers.Body: <p>The <code>dateCreated</code>, <code>dateUpdated</code> and <code>uid</code> columns are more internal Craft auditing columns that Craft manages for every row in every table.</p>
  
  <p>Maybe what you're looking for is the <code>postDate</code> column for entries, which you can set a custom value to.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-18T21:22:39.077Z
Answers.Text: Thanks, Brad. Is postDate the date you see in the CP when you're creating an entry? We basically want to set that to a date in the past when creating entries via our plugin.
Answers.UserDisplayName: Russ Back
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-07T18:25:51.280Z
Answers.Text: I believe so, yeah.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-18T17:31:22.110Z
Answers.LastActivityDate: 2014-12-18T17:31:22.110Z
Answers.UserDisplayName: Brad Bell
Body: <p>I've tried this but it doesn't seem to be working:</p>
  
  <pre><code>$entry = EntryModel::populateModel(array(
      'dateCreated' =&gt; DateTimeHelper::formatTimeForDb($someTimeStamp),
      'sectionId' =&gt; 1
      'typeId' =&gt; 1
  ));
  
  craft()-&gt;entries-&gt;saveEntry($entry);
  </code></pre>
  
Tags: <plugin-development><entrymodel>
Title: How can I set the dateCreated attribute on an EntryModel?
ThreadText: # How can I set the dateCreated attribute on an EntryModel?
  
  (Asked by: username_0 on 2014-12-18)
  
  I've tried this but it doesn't seem to be working:
  
  ```
  $entry = EntryModel::populateModel(array(
      'dateCreated' => DateTimeHelper::formatTimeForDb($someTimeStamp),
      'sectionId' => 1
      'typeId' => 1
  ));
  
  craft()->entries->saveEntry($entry);
  
  ```
  
  **Tags:** plugin-development, entrymodel
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-12-18. Score: 0 | Accepted answer
  
  The `dateCreated`, `dateUpdated` and `uid` columns are more internal Craft auditing columns that Craft manages for every row in every table.
  
  Maybe what you're looking for is the `postDate` column for entries, which you can set a custom value to.
  
  > **Comments:**
  > **username_0**: Thanks, username_1. Is postDate the date you see in the CP when you're creating an entry? We basically want to set that to a date in the past when creating entries via our plugin.  
  > **username_1**: I believe so, yeah.  
  
  ---
  
  