1

In our app the same update is executed in a SQL Server and a SQLite database.

The issue is that SQL Server works as expected however SQLite somehow is getting always 1/1/0001.

This is the update command:

UPDATE ReviewSow 
SET 
SowingDate = '7/1/2016 12:00:00 AM -03:00'
WHERE 
ReviewSowId = 3366;

Any idea why this could be happening?

1 Answers1

0

The solution was rather odd. When converting the date to ticks and passing as a string it works perfectly! Strange but this is how SQLite works.

Example:

UPDATE ReviewSow SET SowingDate = '636263784001230000' WHERE ReviewSowId = 3366;

to convert DateTime to ticks:

((DateTimeOffset)value).Ticks.ToString()