Dennis Cote <[EMAIL PROTECTED]> wrote: > > sqlite> select strftime('%f', 'now'); > 0.622 > sqlite> select strftime('%f', current_timestamp); > 34.000 > > You might want to file a bug report about this. >
This isn't a bug. The magic current_timestamp keyword is really an alias for "datetime('now')". And datetime('now') returns you a text string in the format "YY-MM-DD HH:MM:SS". Yes, this means that the seconds have been rounded to the nearest whole second. But that is what current_timestamp keyword is documented to do. Imagine the outcry and all the broken code if current_timestamp suddenly started returning dates in the format "YY-MM-DD HH:MM:SS.SSS". Would could think about adding a new magic keyword, perhaps current_hires_timestamp, that included the fractional seconds. Such a magic keywords would be an alias for strftime('%Y-%m-%d %H:%M:%f','now'). But adding this new keyword will be a hard sell since there is a lot of emphasis on avoiding code bloat. So for now, you are better off just using the strftime function if you need a high resolution timestamp. Or (and better in my view) store your dates as julian day numbers and convert to a ISO8601 for display only. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------