Im using AzureMobileServices
for sync data but using SQLite
for retrieving data because I could not get anything working for executing raw queries in azure services.
Im able to get records but my problem is with DateTime column in table. I always get weird date like 01/01/0001 or something like this.
Things I have tried:
Parse<Model>().Query("select datetime(CreatedAt, 'unixepoch') CreatedAt from table");
Parse<Model>().Query("select strftime('%d/%m/%Y',CreatedAt / 10000000 - 62135596800,'unixepoch') as createdAt from table");
Only time I get correct date and time when I run execute scalar and parse it into string like this:
connection.ExecuteScalar<string>("select datetime(CreatedAt, 'unixepoch') as createdAt from table limit 1");
Its not being parsed into my Model properly which has this property
public DateTime? CreatedAt {get; set;}
Edit
This is how it looks in sqlite