Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL ignores my date range

Status
Not open for further replies.

vcujackson

Technical User
Apr 7, 2009
18
US
Here is a partial statement from a query I wrote in QA for SQL server 2005

gifteffdat >='2009-07-01 00:00:000'

Our database formats the date in a datetime format. For some reason SQL is ignoring my gifteffedat. Have I formatted this incorrectly?
 
I didn't saw anything wrong in this (unless your SET DATEFORMAT is different). What is 07? Month, DAY? That is why I prefer:
Code:
gifteffdat >='20090701'
That date is NOT ambitious, it has always the same format:
YYYYMMDD.

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
That date is NOT ambitious,

I think it's a very ambitious date. It's not very ambiguous, though.

Sorry... I couldn't resist.

[2thumbsup]
 
:)
You are right of course :)

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top