I want to update the datetime of a column but this is what the data is being inserted 01/01/0001 00:00:00. I can get the current datetime but when insert insert that to my sqlite database the result is 01/01/0001 00:00:00. How can I fix that?
var current_datetime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:00");
var current = Convert.ToDateTime(current_datetime);
string retailer_group_sql = "UPDATE tblRetailerGroup SET "'LastSync = '" + current + "', MobileUpdate = '" + current + "' WHERE RetailerCode = '" + retailerCode + "'";
await conn.ExecuteAsync(retailer_group_sql);