Next
Update
Prev

You can use Date Formatter (<DateFormatter>) to convert the data string to a date format. This example demonstrates how to display the default Date format for the Receive column and how to display the date format of YYYY-MM-DD for the Send column.

The original data must be a format of YYYY/MM/DD (e.g. 2015/12/31, 20151231, 2015-12-31).

...
<DateFormatter id="datefmt" />
<DateFormatter id="datefmt1" formatString="YYYY-MM-DD" />
...  
  <DataGridColumn dataField="ReceiveDate" ... formatter="{datefmt}" />
  <DataGridColumn dataField="SendDate" ... formatter="{datefmt2}" />
...

<DateFormatter>

Y It represents Year. If the No. of letters in the pattern is 2, then it represents two-digit years. Otherwise it represents four-digit years. In the 3rd one of the following examples, "0" is added at the beginning of the year to fill the total No. of digits. e.g. YY = 05, YYYY = 2005, YYYYY = 02005
M It represents Month. If the No. of letters is 1, then it will be interpreted as a single-digit or double-digit number. If the No. of letters is 2, then it will be interpreted as a double-digit number. If the No. of letters is 3, then it will be interpreted as an ellipsis text. If the No. of letters is 4, then it will be interpreted as a non-ellipsis text. e.g. M = 7, MM = 07, MMM = Jul, MMMM = July
D It represents Day. e.g. D = 4, DD = 04, DD = 10
E It represents the day of the week. If the No. of letters is 1, then it will be interpreted as a single-digit or double-digit number. If the No. of letters is 2, then it will be interpreted as a double-digit number. If the No. of letters is 3, then it will be interpreted as an ellipsis text. If the No. of letters is 4, then it will be interpreted as a non-ellipsis text. e.g. E = 1, EE = 01, EEE = Mon, EEEE = Monday
A It represents AM / PM.
J It represents hour (0 ~ 23).
H It represents Hour (1 ~ 24).
K It represents Hour with AM / PM (0 ~ 11).
L It represents Hour with AM / PM (1 ~ 12).
N It represents Minute. e.g. N = 3, NN = 03
S It represents Second. e.g. SS = 30
The others You can add text to the pattern. Punctuation, number and any of lowercase letters can be used. Don’t use uppercase letters because it can be recognized as the part of the pattern. e.g. EEEE, MMM.D, YYYY at H:NN A = Tuesday, Sept. 8, 2003 at 1:26 PM

© 2017 KoolChart. All rights reserved.