The format you need is:
'2007-01-01 10:00:00'
i.e. yyyy-MM-dd HH:mm:ss
If possible, however, use a parameterised query as this frees you from worrying about the formatting details.
More Related Contents:
- Select first row in each GROUP BY group?
- How to return only the Date from a SQL Server DateTime datatype
- DateTime2 vs DateTime in SQL Server
- How can I list the tables in a SQLite database file that was opened with ATTACH?
- SQLite Reset Primary Key Field
- How to pivot in SQLite or i.e. select in wide format a table stored in long format?
- Get day of week in SQL Server 2005/2008
- How do I dump the data of some SQLite3 tables?
- SQLite – How do you join tables from different databases?
- How to determine the number of days in a month in SQL Server?
- Does SQLite3 not support foreign key constraints?
- MySQL’s now() +1 day
- SQLite – ORDER BY RAND()
- Preventing adjacent/overlapping entries with EXCLUDE in PostgreSQL
- SQL Server convert string to datetime
- Query to get records based on Radius in SQLite?
- How to use SQL Order By statement to sort results case insensitive?
- Select random row(s) in SQLite
- sqlite alter table add MULTIPLE columns in a single statement
- Get month from DATETIME in sqlite
- How do I import .sql files into SQLite 3?
- sqlite equivalent of row_number() over ( partition by …?
- Generating dates between two dates
- How to create timestamp column with default value ‘now’?
- Getting Dates between a range of dates
- Convert INT to DATETIME (SQL)
- How to use Timestamp_to_scn and Scn_to_timestamp in Oracle?
- SQLite3 UNIQUE constraint failed error
- Does SQLite3 have prepared statements in Node.js?
- Copy table structure to new table in sqlite3