Solved

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

Posted on 2013-06-04
4
663 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 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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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