On Mar 03, 2007 3:49 AM, Dennis Birch wrote:
> I've saved my REALSQLDatabase-based application's date data in date
> columns (e.g. field.DateValue = d). Now how do I write an SQLSelect
> statement that can compare a given date with what I've saved in the
> database? You obviously can't write "SELECT * FROM myTable WHERE
> entryDate = d. I've tried using "d.SqlDate", but that doesn't work.
> What does?

Check this report:
"Dates inserted using DatabaseRecord's DateColumn on a Date column (YYYY-MM-DD)
give WRONG comparison results!"
<http://www.realsoftware.com/feedback/viewreport.php?reportid=ytjmuobi>

One of the workarounds I found was to use:
SELECT * FROM table WHERE date(entryDated) = '2006-01-07'

Anyway, I also agree with other posters on using dates. I also use YYYYMMDD as
an integer (faster for comparisons) to avoid those problems with dates.

Carlos





_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to