syntax:functions:format
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
syntax:functions:format [2019/12/06 04:45] – andrew | syntax:functions:format [2021/08/30 02:04] (current) – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== format(date_as_number, format) ===== | + | ====== Format(datetime, format) ====== |
+ | Category: | ||
- | Converts | + | \\ |
+ | =====Description===== | ||
+ | This function converts | ||
- | ^ | + | \\ |
- | | | + | =====Arguments===== |
- | | format(41640,' | + | ^Argument^Type^Description^ |
+ | |datetime | ||
+ | |format | ||
+ | **Return value type:** Text. | ||
+ | \\ | ||
+ | ==== 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' | ||
- | === Format string components === | + | :!: The specifiers below are case-sensitive. |
- | A format string defines a formatting template for dates. Its components can be put together in any combination. If a character doesn' | + | ^ |
- | + | | | |
- | Note that the colon (":" | + | | |
- | + | | | |
- | **Attention** | + | |
- | + | ||
- | ^ | + | |
- | | | + | |
- | | | + | |
- | | | + | |
| M |The month, from 1 through 12. | | | M |The month, from 1 through 12. | | ||
| MM |The month, from 01 through 12. | | | MM |The month, from 01 through 12. | | ||
| MMM |The abbreviated name of the month. | | MMM |The abbreviated name of the month. | ||
| MMMM |The full name of the month. | | MMMM |The full name of the month. | ||
- | | | + | | |
- | | | + | | |
- | | | + | | |
+ | |||
+ | ^ Time format specifier^ | ||
| h |The hour, using a 12-hour clock from 1 to 12. | | | h |The hour, using a 12-hour clock from 1 to 12. | | ||
| hh |The hour, using a 12-hour clock from 01 to 12. | | | hh |The hour, using a 12-hour clock from 01 to 12. | | ||
- | | H |The hour, using a 24-hour clock from 1 to 24. | | + | | H |The hour, using a 24-hour clock from 0 to 23. | |
- | | HH |The hour, using a 24-hour clock from 01 to 24. | | + | | HH |The hour, using a 24-hour clock from 00 to 23. | |
| m |The minute, from 0 through 59. | | | m |The minute, from 0 through 59. | | ||
| mm |The minute, from 00 through 59. | | | mm |The minute, from 00 through 59. | | ||
| s |The second, from 0 through 59. | | | s |The second, from 0 through 59. | | ||
| ss |The second, from 00 through 59. | | | ss |The second, from 00 through 59. | | ||
- | | tt |The localized | + | | t |The first character of the AM/PM designator. |
+ | | tt |The AM/PM designator. | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | Note that the colon (":" | ||
+ | \\ | ||
+ | =====Examples===== | ||
+ | format( 41640, ' | ||
+ | format( 43658, ' | ||
+ | format( 41640.75, ' | ||
- | === See also === | + | \\ |
+ | ===== See also ===== | ||
+ | * [[syntax: | ||
+ | * [[syntax: | ||
* [[https:// | * [[https:// | ||
- | * [[syntax: | ||
- | * [[syntax: |
syntax/functions/format.txt · Last modified: 2021/08/30 02:04 by craigt