?
Solved

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

Posted on 2013-06-04
4
Medium Priority
?
673 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
[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
  • 2
4 Comments
 
LVL 101

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 101

Accepted Solution

by:
mlmcc earned 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

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. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
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…
Suggested Courses

771 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