Date and time column in a results view

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Sep/2016, at 16:10

The date and time format displayed in the results view is configurable.

There are two main formats:

Classic date/time format, shown as numeric information

Time ago format, shown as the elapsed time since the last modification

Some results in the default configuration, e.g. wire stories show the classic date/time format, while some, e.g. articles, show the time ago format.

The format of the classic date/time is by default inherited from the client's regional setting in the Windows Control Panel. You can force a different format by modifying the directory style. The time ago format wording is fixed, but its tooltip shows the classic date/time format.

The following screenshot shows the examples of the classic and time ago format:

datetimeformat01

Changing the format of the classic date/time format on your workstation

Run the Windows Control Panel, and then, in the Format box of the Region dialog, select another format. Restart your GN4 application. This changes the display of all dates, but only on that workstation. If you switch to another workstation, the date/time format will be as specified on that workstation.

Click to toggle graphic size

Changing the format of the classic date/time format in a GN4 directory style

Open the directory style, and then modify the date/time column format using a converter to display the creation or modification date, from the default syntax:

<TextBlock 

 VerticalAlignment="Top" 

 Text="{Binding Path=[archiveObject.creationDate]}"

/>

to the converter syntax (all the highlighted text goes in the single line, here is shown in more lines for the better readability):

<TextBlock 

 VerticalAlignment="Top" 

 Text="{Binding Path=[archiveObject.creationDate], 

 Converter={StaticResource StringFormatValueConverter}, 

 ConverterParameter=\{0:d/M/yyyy HH:mm:ss\}}"

/>

The cyan highlight marks the date/time formatting option. To learn more about all available options, see http://www.csharp-examples.net/string-format-datetime/

.