sqliteHow do I use the SQLite YEAR function?
The SQLite YEAR function is used to extract the year from a date value. It takes a single argument, which must be a valid date value. The output is an integer value representing the year.
The code above uses the YEAR function to extract the year from the date value '2019-11-02'. The output is the integer value 2019.
The YEAR function can also be used in combination with other date functions to extract more specific information. For example, the following code will extract the year from the current date:
- SELECT: the keyword used to retrieve data from the database
- YEAR(): the function used to extract the year from a date value
- '2019-11-02': the argument passed to the YEAR function, representing a valid date value
- Output: the integer value representing the year extracted from the date value
- CURRENT_DATE: the function used to get the current date
More of Sqlite
- How do I use the SQLite ZIP VFS to compress a database?
- How do I use SQLite with Zephyr?
- How do I use UUIDs in SQLite?
- How do I use SQLite with Visual Studio?
- How can I store JSON data in a SQLite column?
- How do I use the SQLite zfill function?
- How do I download and install SQLite zip?
- How can I use SQLite with Zabbix?
- How do I import data from a SQLite zip file?
- How do I use SQLite to zip a file?
See more codes...