Freelance Project Requests Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net




How to add a date value to a SQLite table?

Date with time Transfer with Values: 
2018-10-04 05:39:22
YYYY-MM-dd hh:mm:ss
Date as day Transfer with Values: 




Java code example

//< set_Values >
String sDay = clsDate.format_to_ShortDate(dtDay);
String sNow = clsDate.format_to_Date_SQLite(
new Date());

ContentValues values = new ContentValues();
"dtDay", sDay);
"dtEdit", sNow);
//</ set_Values >

//< add >
long newID = db.insert("tbl_Notes", null, values);
//</ add >




In doing so, SQLite recognizes the date format of the string when saving.


Here is the database at runtime.

In the left column you can see the short day-date

And in the dtEdit column is a detailed date with day-time



Contact for Jobs, Project Requests: