First of all, I'm very sorry, I didn't find sqlite in this section, but I do is call in c #, so I can only post here, please by the administrator,
Problems are as follows: (note that grammar is to use sqlite, not c # syntax)
If the field is not empty, then perform a datetime "(' now ', 'a localtime)"