syntax:functions:date
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
syntax:functions:date [2015/02/01 13:55] – created dmitry | 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 | ||
+ | |||
+ | \\ | ||
+ | =====Use cases===== | ||
+ | //Date// is used to convert a text-based date-time value into its corresponding date-time serial value so it may be used in date-time-related calculations, | ||
+ | |||
+ | \\ | ||
+ | =====Arguments===== | ||
+ | ^Argument^Type^Description^ | ||
+ | |datetime | ||
+ | |format | ||
+ | |||
+ | **Return value type:** Number (date-time serial value). | ||
+ | |||
+ | \\ | ||
+ | ==== Date-Time format string components ==== | ||
+ | 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 :!:. | ||
+ | ^ Date format specifier^ | ||
+ | | d |The day of the month, from 1 through 31. | | ||
+ | | dd |The day of the month, from 01 through 31. | | ||
+ | | ddd |The abbreviated name of the day of the week. | | ||
+ | | M |The month, from 1 through 12. | | ||
+ | | MM |The month, from 01 through 12. | | ||
+ | | MMM |The abbreviated name of the month. | ||
+ | | MMMM |The full name of the month. | ||
+ | | y |The year, from 0 to 99. | | ||
+ | | yy |The year, from 00 to 99. | | ||
+ | | yyyy |The year as a four-digit number. | ||
+ | |||
+ | ^ 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:// |
syntax/functions/date.txt · Last modified: 2023/11/24 21:06 by craigt