Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query Builder on BOXIR2 7 54
Crystal XI Report - Add Formula to Sort - change date to YYYY 3 46
C# InstallShiled - Multiple Projects 3 59
Crystal image Object type? 7 28
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

947 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

16 Experts available now in Live!

Get 1:1 Help Now