Solved

Exporting to Excel shows null date as 1/1/1900

Posted on 2013-06-04
4
639 Views
Last Modified: 2013-06-26
This is my formula:

if {EMPLOYEE.TERM_DATE} <> #1/1/1700# then {EMPLOYEE.TERM_DATE} else
if {EMPLOYEE.FST_DAY_WORKED} <> #1/1/1700# then {EMPLOYEE.FST_DAY_WORKED}

When I export the results to Excel, the null values (1/1/1700) are showing up as 1/1/1900.  Any assistance would be much appreciated.
0
Comment
Question by:jph826
  • 2
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39219041
In Crystal NULL dates will default to 1/1/1900.

Why if they are NULL are you testing for 1/1/1700

I believe Excel also defaults the dates to 1/1/1900

mlmcc
0
 

Author Comment

by:jph826
ID: 39219368
Basically what the formula should do is look at the term date field, if it is not null, then show the term date, else if the first day worked field is not null, then show the first day worked date.

This will be a scheduled report with an Excel output for the user.  Is there a way to avoid the null values showing up (in the export to Excel) as anything other than a blank cell?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39219662
Try a formula like

If NOT IsNull({EMPLOYEE.TERM_DATE}) then
    {EMPLOYEE.TERM_DATE}
Else If Not IsNull({EMPLOYEE.FST_DAY_WORKED})  then
    {EMPLOYEE.FST_DAY_WORKED}
Else
    Date(1900,1,1)

Open in new window


mlmcc
0
 

Author Comment

by:jph826
ID: 39219750
Thanks.  That formula should have worked but it did not return any data.  For example, employee Jane had a blank Term_Date field, but the Fst_Day_Worked field was populated with 5/21/2013.  I expect the formula to return 5/21/2013 but it did not.  My initial formula returned the correct data, the only issue was when exporting to Excel.

At any rate, I added "Else Date(1900,1,1)" to the end of my original formula and it returned the correct results and the export to Excel no longer shows 1/1/1900 for the null values.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now