version 6.5.4
WR INSERT DATE AND TIME (area; dateFormat; timeFormat)
| Parameter | Type | Description | |
| area | Longint | 4D Write area | |
| dateFormat | Integer | Number of the date format | |
| timeFormat | Integer | Number of the time format |
Description
The WR INSERT DATE AND TIME command allows you to insert at the cursor location a reference that displays the dynamic date and/or time. If there is a current text selection in your document, it will be replaced with the inserted reference.
The dateFormat parameter allows you to set a display format for the date reference.
You must use the following 4D constants, found in the "Date Display Formats" theme:
| Date format | Constant (value) |
| <No date> | wr no date format (0) |
| 1/6/00 | System date short (1) |
| Thu, Jan 6 2000 | System date abbreviated (2) |
| Thursday, January 6 2000 | System date long (3) |
| 01/06/2000 | Internal date short special (4) |
| January 6, 2000 | Internal date long (5) |
| Jan 6, 2000 | Internal date abbreviated (6) |
| 01/06/2000 | Internal date short (7) |
The timeFormat parameter returns the time format number for the inserted reference. You must use the following 4D constants, found in the "Time Display Formats" theme:
| Time format | Constant (value) |
| <No time> | wr no time format (0) |
| HH:MM:SS | HH MM SS (1) |
| HH:MM | HH MM (2) |
| HH hours MM minutes SS seconds | Hour Min Sec (3) |
| HH hours MM minutes | Hour Min (4) |
| HH:MM AM PM | HH MM AM PM (5) |
See Also