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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking For Empty Date Fields 1

Status
Not open for further replies.

KeyserSoze

Programmer
May 18, 2000
79
US
Greetings:

Does anyone know what the value of an empty date field contains? I am attempting to create a formula that will do a special calculation if a date field has no value in it? I used the IsNull function, but this has been unsuccessful.

My data resides in MS SQL Version 7 and I am using Crystal Reports 7.

Thanks!

..... Keyser
 
NULL is the usual, but it could be anything.
Go into the Query Analyzer in SQL Server and check to see if there are any nulls in that column, or ask your DBA to check and give you the record id of column that has a NULL date. This will speed up your checking in Crystal.
 
I sometimes found that some fields in SQL Server 7 were set to a single space instead of empty string or null.
Could this have anything to do with it??
 
Greetings!

I found my problem. Essentially, the empty date fields are set to null. However, in my testing, I was not checking for null for both conditions of my IF-ELSE logic. Incorporating the proper checks solved my problem.

Thanks you, everyone, for your help on this.

.... Keyser
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top