title: Using Generalized Time in custom field
body: <p>We are looking to add a couple of date fields to our Active Directory schema in 2008 R2 to help facilitate a bit of automation. In particular adding in a <code>hireDate</code> field that is populated automatically from an import.</p>
  
  <p>This all works as expected in our test environment, however I am curious if there is a way to enhance the display of this custom attribute when it comes to dates.</p>
  
  <p>The <code>hireDate</code> field is set as a <em>Syntax</em> of <em>Generalized Time</em> to match the native fields such as <code>whenCreated</code>.</p>
  
  <p>However, when placing a date in to <code>hireDate</code>, it formats this much different than <code>whenCreated</code> for the display</p>
  
  <pre><code>&gt; $user = Get-ADUser MyUser -Properties whenCreated,hireDate
  &gt; $user
  
  -- snip --
  hireDate          : {19870301070000.0Z}
  whenCreated       : 8/28/2014 12:24:42 PM
  </code></pre>
  
  <p>If I inspect the <em>MemberType</em> of these properties, they are different too even though they are both <em>Generalized Time</em></p>
  
  <pre><code>$user | Get-Member -MemberType Properties
  
     TypeName: Microsoft.ActiveDirectory.Management.ADUser
  
  Name              MemberType Definition
  ----              ---------- ----------
  hireDate          Property   Microsoft.ActiveDirectory.Management.ADPropertyValueCollection hireDate {get;set;}
  whenCreated       Property   System.DateTime whenCreated {get;}
  </code></pre>
  
  <p>Is there a proper way to create a custom attribute as a <code>DateTime</code> or are we limited with the way to create these attributes?</p>