81
SQLite datetime Function
The SQLite datetime function is used to retrieve date and time in different format. The result format of datetime function is ‘YYYY-MM-DD HH:MM:SS’.
Syntax:
Example1: Retrieve current date and time:
Output:
Example2: Add/ subtract years to current date and time:
Output:
Example3: Add/ subtract days to current date and time:
Output:
Example4: Add/ subtract hours to current date and time:
Output:
Example5: Add/ subtract minutes to current date and time:
Output:
Next TopicSQLite Juliandday