Skip to content

Commit c7e6e6c

Browse files
committed
[update] date format info updated
1 parent a722c65 commit c7e6e6c

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/guides/loading-exporting-data.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ const data = [
6868
];
6969
~~~
7070

71-
See also how to define fields and Pivot structure: link to be added
71+
:::note
72+
See also how to define fields and Pivot structure: [Working with data](guides/working-with-data)
73+
:::
7274

7375
## Loading data
7476

@@ -300,4 +302,36 @@ exportButton.textContent = "Export";
300302
document.body.appendChild(exportButton);
301303
~~~
302304

305+
## Setting date format
306+
307+
The Pivot accepts a date that is parsed into the Date object. By default, the `dateFormat` of the current locale is applied. To redefine the format, change the value of the `dateFormat` property in the **Locale** tag.
308+
309+
Pivot uses the following characters for setting the date format:
310+
311+
| Character | Definition |Example |
312+
| :-------- | :------------------------------------------------ |:------------------------|
313+
| %d | day as a number with leading zero | from 01 to 31 |
314+
| %j | day as a number | from 1 to 31 |
315+
| %D | short name of the day (abbreviation) | Su Mo Tu Sat |
316+
| %l | full name of the day | Sunday Monday Tuesday |
317+
| %m | month as a number with leading zero | from 01 to 12 |
318+
| %n | month as a number | from 1 to 12 |
319+
| %M | short name of the month | Jan Feb Mar |
320+
| %F | full name of the month | January February March |
321+
| %y | year as a number, 2 digits | 24 |
322+
| %Y | year as a number, 4 digits | 2024 |
323+
| %h | hours 12-format with leading zero | from 01 to 12 |
324+
| %g | hours 12-format | from 1 to 12 |
325+
| %H | hours 24-format with leading zero | from 00 to 23 |
326+
| %G | hours 24-format | from 0 to 23 |
327+
| %i | minutes with leading zero | from 01 to 59 |
328+
| %s | seconds with leading zero | from 01 to 59 |
329+
| %a | am or pm | am (for time from midnight until noon) and pm (for time from noon until midnight)|
330+
| %A | AM or PM | AM (for time from midnight until noon) and PM (for time from noon until midnight)|
331+
| %u | milliseconds | 128 |
332+
333+
To present the 20th of June, 2024 with the exact time as *2024-09-20 16:47:08.128*, specify "%Y-%m-%d-%H:%i:%s.%u".
303334

335+
Example:
336+
337+
to be added

0 commit comments

Comments
 (0)