year, quarter, month, day
These functions extract specific numeric info of the dates. 0 is returned if the input value contains no recognizable date.
Function Name | Result |
---|---|
year | 4-digit year |
quarter | quarters 1-4 |
month | months 1-12 |
day | day in month 1-31 |
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
date or string converted to date | Date Value to extract as described above |
Type | Description |
---|---|
numeral | Result Returned value as described above |
a[] = "14. July 2020, 15:30:40";
echo( year( a[] ), ", ", quarter( a[] ), ", ", month( a[] ), ", ", day( a[] ) );
2020, 3, 7, 14