U++ framework
Do not panic. Ask here before giving up.

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: 14290
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: Tue Apr 28 17:28:08 GMT+2 2026

Total time taken to generate the page: 0.00906 seconds