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
Re: Date emulation for Sqlite [message #5294 is a reply to message #5291] Tue, 12 September 2006 20:07 Go to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

The only problem with sqlite is when you select "stringed dates" into value and you want that value to be date type.
Now I use ScanDate which seems to work well.

Value dt = ScanDate(String(SQL[DT])); //DT column that holds date

Date ScanDate(String &s)
{
if(s.IsEmpty())
return Null;
int year = atoi(s.Left(4));
int month = atoi(s.Mid(5, 2));
int day = atoi(s.Right(2));

return Date(year, month, day);
}


But I agree that is troublesome and your chage is wanted.

[Updated on: Tue, 12 September 2006 22:24]

Report message to a moderator

 
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 Jul 08 14:15:29 CEST 2025

Total time taken to generate the page: 0.04934 seconds