So, for this article first we will open SQLite studio and create a new SQLite database named as EmployeeDB.
Now let's create a sample table in the database and after creating table will add come values in it.
As we all know SQLite support only support BLOB, INTEGER, NUMERIC, REAL, TEXT. It does not have specific datatype in SQLite database. So, for date field we use datatype text. Here I have taken two field which expect value as date one is Date_Of_Birth and second one is Created_Date. Here I have user CURRENT_TIMESTAMP to set default datetime for Created_Date field. Now let's add some record in table and check for output.
Here for Date_Of_Birth field I have passed date in yyyy-mm-dd format. After executing the query lets check the output in table.Here we are able to see the date value which we passed and value for Created_Date is auto populating the value.
Info!
SQLite does not have any specific datatype for DateTime filed. We user TEXT, REAL, or INTEGER values: TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS).
For more detail you can refer https://sqlite.org/lang_datefunc.html
For more detail you can refer https://sqlite.org/lang_datefunc.html