c++ - How parse datetime format from datebase? -
the database (sqlite) has field of type real values of form (42153.659595). how translate value in form "dd.mm.yy hh:mm:ss" if 42153.659595 = 29.05.2015 15:49:49 ?
you can explicit calendar system require: http://www.sqlite.org/lang_datefunc.html
select julianday('now') - julianday('1776-07-04');
in principle don't "parse" (you mean: interpret raw representation). use sqlite api/builtin sql functions you
in interest of information:
- the date , time functions use a subset of is0-8601 date , time formats.
- the datetime() function returns "yyyy-mm-dd hh:mm:ss". julianday() function returns julian day - number of days since noon in greenwich on november 24, 4714 b.c. (proleptic gregorian calendar)
- the date() function returns date in format: yyyy-mm-dd. time() function returns time hh:mm:ss.
Comments
Post a Comment