Timestamps in Gnucash Mysql

Phil Longstaff plongstaff at rogers.com
Wed Aug 12 08:25:31 EDT 2009


On August 12, 2009 03:06:40 am marcus.wolschon at googlemail.com wrote:
> I just found out that gnucash stores
> DatePosted and DateEntered as Strings
> instead of the proper DateTime or Timestamp
> sql data-types.
>
> Why is that? In XML it already uses a proper
> date-format.
>
> This makes is very hard to sort by date in
> SQL-queries and to select a range as you need
> a complex fulltext-index instead of a trivial
> integer index. (There are supposed to be MANY
> transactions and splits in there.)

That goes back to the time when the sql backend couldn't support different 
SQL/DDL code for the different db engines.  There is no SQL standard for a 
date/time that all 3 db's (sqlite3/mysql/pgsql) share.

Now that the sql backend can support different column types for the 3 dbs, it 
does make sense to use the proper types.

Phil


More information about the gnucash-devel mailing list