title: WPF/C# - Applying date format to listview
body: <p>I have a listview bound to a collection of objects. One of the properties is a DateTime object named startDate. It's displayed in the standard 1/1/2001 1:00:00 PM format</p>
  
  <p>I want to put the date in yyyy-MM-dd HH:mm:ss.fff format just for display purposes. Is there a way to keep the underlying DateTime object in tact while displaying it in the desired format above? I'd prefer to do this in XAML as opposed to adding a display property to the object or something along those lines. </p>
  
  <p>The objects implement the INotifyPropertyChanged interface, if that matters. </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ListView x:Name="lvBatches" 
                    SelectionMode="Single"
                    Margin="12,73,349,61" 
                    Background="WhiteSmoke" 
                    SelectionChanged="lvBatches_SelectionChanged"
                    ToolTip="Click on the column headers to sort by that column"
                    FontSize="10pt"
                    ItemContainerStyle="{StaticResource itemStyle}" 
                    ItemsSource="{Binding batchCollection}"&gt;
  &lt;!-- ... --&gt;
      &lt;GridViewColumn x:Name="colStart" 
                      Width="200" 
                      DisplayMemberBinding="{Binding startDate}"&gt;
          &lt;GridViewColumnHeader Content="Start Date"
                                Click="GridViewColumnHeader_Click"/&gt;
      &lt;/GridViewColumn&gt;
  </code></pre>
  
  <p>Thanks in advance, all. </p>