Column styles for date values: Standard and TimeAgo (fuzzy) date

Build 1501 on 14/Nov/2017  This topic last edited on: 6/Sep/2016, at 13:33

Normal date (absolute value with hh:mm:ss time)

       <ColStyle Name="Modified" Height="0" SortName="Modified">

         <CellTemplate>

           <TextBlock Text="{Binding Path=[page.modifiedDate]}"/>

         </CellTemplate>

       </ColStyle>

Normal date (absolute value with hh:mm time)

       <ColStyle Name="Modified" Height="0" SortName="Modified">

         <CellTemplate>

            <TextBlock Text="{Binding Path=[page.modifiedDate], Converter={StaticResource StringFormatValueConverter}, ConverterParameter=\{0:g\}}}"/>

         </CellTemplate>

       </ColStyle>

Fuzzy date (relative value)

       <ColStyle Name="Modified" Width="100" Height="0" SortName="Modified">

         <CellTemplate>

           <l:TimeAgoBlock VerticalAlignment="Top" Text="{Binding Path=[archiveObject.modifiedDate]}" />

         </CellTemplate>

      </ColStyle>

timeago

 

See also

Date formats reference