Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Date emulation for Sqlite
Date emulation for Sqlite [message #5291] Tue, 12 September 2006 17:37 Go to previous message
mirek is currently offline  mirek
Messages: 14263
Registered: November 2005
Ultimate Member
Sqlite does not support DATE type, which is a bit trouble with U++, as we cannot use natural Date <- column conversions.

I have this idea of Date emulation in Sqlite:

Store Date d as

(d - Date(1970, 1, 1)) * 1.0e300.

This way we would know that any double stored in database bigger than 1.0e300 is Date. Comparisons would work as well, the only downsize is that "number of days between" would be a bit high and that you would not be able to store doubles bigger than 1.0e300...

Should I do that? Any better solutions?

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon3.gif
Read Message
Read Message
Previous Topic: A new way how to create "plugin"
Next Topic: uvs2 as "public application"
Goto Forum:
  


Current Time: Mon Jun 30 17:01:56 CEST 2025

Total time taken to generate the page: 0.03747 seconds