Solved

dealing with NULL date fields in Crystall 2008

Posted on 2011-02-15
2
554 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

729 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