| Home | About FairCom | Products | Support | Sales | Contact Info | Site Map | Download | Newsletter |

Company Overview
History
Our Customers
Success Stories
Contact Information
Why FairCom
FairCom Logos
Press Releases
Customer Quotes
Site Map
Read the Dr. Dobb's Journal article on cross-platform database Programming
Read HP WORLD's article on the c-tree Server
Read the Linux Journal review on c-tree Plus
FairCom Brochure
 
 

Differences With c-treeSQL Date Types

The following query on a table containing a Date field can return unexpected rows:

SELECT * FROM myTable WHERE myDate >= '0001-01-01' AND myDate <= '9999-01-01'

However, this query returns the expected set of rows.

SELECT * FROM myTable WHERE myDate >= '1700-03-01' AND myDate <= '9999-01-01'

Why the difference?

The c-tree Plus Date field type stores dates as an unsigned four byte integer representing the number of days since 02/28/1700. Hence the first valid date is 03/01/1700. Date values before this date can result in unexpected results. Thus, when performing c-treeSQL queries on date data, keep in mind the c-tree Plus 2/28/1700 epoch starting value.


 
We have used FairCom products to underpin our Workforce HR application for more than 10 years. Over all this time, c-tree and c-tree Plus have consistently helped provide thousands of our users in hundreds of organizations with the performance, scalability, robustness, and low cost of ownership that they demand from their HR package. Whenever we have needed advice, FairCom's technical staff have provided swift and expert help to a standard that is rarely seen in our industry.

Nick King
Development Director, Intellect Business Consultants Ltd.

 
WEB COMMENTS
Copyright 2006 FairCom Corporation. All rights reserved.