Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

dealing with NULL date fields in Crystall 2008

Posted on 2011-02-15
2
Medium Priority
?
557 Views
Last Modified: 2012-05-11
Morning Experts,

I'm working with a report that has Date Time criteria.  When an end user views a screen within the application that contains a Date or DateTime field it stores the default date of Jan 1 1800 in order to display the data as a Date or DateTime.  This means that for most records in the database these fileds are populated with either a true date, or 1800,1,1.  So when working with selection criteria to find records without certain date having been filled out we would use a formula such as:

{custom_loanmain.OptimumReimbDate} = DateTime (1800, 01, 01, 00, 00, 00)

This has been working fine for some time but recently we have an issue where the workflow of the user may allow them to never visit certain screens within the application and therefore these fields are not populated but remain NULL.  These records are then screened from the report as they do not meet the selection critera.  What would be the correct syntax to select records that are both NULL and = (1800, 01, 01, 00, 00, 00)?

0
Comment
Question by:ISBTECH
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 34898079
isnull({custom_loanmain.OptimumReimbDate}) or ({custom_loanmain.OptimumReimbDate} = DateTime (1800, 01, 01, 00, 00, 00))

0
 

Author Closing Comment

by:ISBTECH
ID: 34899509
Thanks that worked perfectly!  I was doing it backwards:

{custom_loanmain.OptimumReimbDate} isnull
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question