syntax:functions:date
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| syntax:functions:date [2015/04/03 20:52] – elenap | syntax:functions:date [2023/11/24 21:06] (current) – [Examples] craigt | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Date(date_as_text, format) ===== | + | ====== Date(datetime, format) ====== |
| + | Category: | ||
| - | Converts | + | \\ |
| + | =====Description===== | ||
| + | This function converts | ||
| - | ^ Example | + | \\ |
| - | | date(' | + | =====Use cases===== |
| - | | | + | //Date// is used to convert a text-based |
| - | | date(' | + | |
| + | \\ | ||
| + | =====Arguments===== | ||
| + | ^Argument^Type^Description^ | ||
| + | |datetime | ||
| + | |format | ||
| - | === Format | + | **Return value type:** Number (date-time serial value). |
| - | Case-sensitive. | + | |
| - | ^ | + | \\ |
| + | ==== Date-Time format | ||
| + | A //format string// defines a formatting template for dates and times. Its components can be put together in any combination. If a character doesn' | ||
| + | |||
| + | The specifiers below are case-sensitive | ||
| + | ^ | ||
| | d |The day of the month, from 1 through 31. | | | d |The day of the month, from 1 through 31. | | ||
| | dd |The day of the month, from 01 through 31. | | | dd |The day of the month, from 01 through 31. | | ||
| Line 23: | Line 35: | ||
| | yyyy |The year as a four-digit number. | | yyyy |The year as a four-digit number. | ||
| - | === See also === | + | ^ Time format specifier^ |
| + | | h |The hour, using a 12-hour clock from 1 to 12. | | ||
| + | | hh |The hour, using a 12-hour clock from 01 to 12. | | ||
| + | | H |The hour, using a 24-hour clock from 0 to 23. | | ||
| + | | HH |The hour, using a 24-hour clock from 00 to 23. | | ||
| + | | m |The minute, from 0 through 59. | | ||
| + | | mm |The minute, from 00 through 59. | | ||
| + | | s |The second, from 0 through 59. | | ||
| + | | ss |The second, from 00 through 59. | | ||
| + | | t |The first character of the AM/PM designator. | ||
| + | | tt |The AM/PM designator. | ||
| + | |||
| + | |||
| + | \\ | ||
| + | =====Remarks===== | ||
| + | This function returns the date-time serial value of the // | ||
| + | |||
| + | To see the date-time serial values in a column of dates, double-click the column' | ||
| + | |||
| + | If a time value is used for the // | ||
| + | |||
| + | While it can be convenient, in some cases, to omit the //format//, it is recommended to specify the date format explicitly, when possible, to ensure deterministic behavior. | ||
| + | \\ | ||
| + | =====Examples===== | ||
| + | |||
| + | **Dates: | ||
| + | date(' | ||
| + | |||
| + | date(' | ||
| + | |||
| + | date(' | ||
| + | |||
| + | date(' | ||
| + | |||
| + | date(' | ||
| + | |||
| + | |||
| + | \\ | ||
| + | **Times: | ||
| + | date(' | ||
| + | |||
| + | date(' | ||
| + | |||
| + | date(' | ||
| + | |||
| + | |||
| + | |||
| + | \\ | ||
| + | ===== See also ===== | ||
| + | * [[syntax: | ||
| + | * [[syntax: | ||
| * [[https:// | * [[https:// | ||
| - | * [[syntax: | ||
| - | * [[syntax: | ||
syntax/functions/date.1428108748.txt.gz · Last modified: by elenap