cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with an Excel data source, where dates are being treated as strings

Former Member
0 Kudos

I am a new Crystal Reports 2008 user, I have produced reports successfully but have hit a problem.

I am using two spreadsheets as data sources for a CR 2008 report. One spreadsheet has a lot of columns which contain dates and time, in the format - 07/10/2008 11:59

When I show the field type on the Field Explorer, some date fields (but not all) show as u201Cdate timeu201D and others are u201Cstring 255u201D. When I u201Cbrowse datau201D on the dates showing as strings, I cannot see any data at all, even though the spreadsheet DOES contain dates.

I am trying to count the number of dates within a group but as CR is treating the fields as strings AND appearing to have no data - nothing is working.

I have tried reformatting the spreadsheet cells as dates and this makes no difference, I have tried using Excel 2003 and 2007 and this makes no difference either.

What is the problem? Why is there nothing showing in the u201Cbrowse datau201D?

I am happy to email a sample of the data if required.

Edited by: Brian Feast on Apr 22, 2009 4:57 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

No update

Former Member
0 Kudos

I had the very same problem.

I found the issue, Its due to space characters (" "). These space character were present in the cells that was supposed to be empty.

I removed all the all these spaces character and report is now able to recognize this column as date..

Former Member
0 Kudos

I had the very same problem.

I found the issue, Its due to space characters (" "). These space character were present in the cells that was supposed to be empty.

I removed all the all these spaces character and report is now able to recognize this column as date..

Former Member
0 Kudos

What type of datasource are you using>

Try OLE DB, works fine for me

Former Member
0 Kudos

Brian

Did you fine a solution. I am having a similar problem. I am configuring the database using ODBC when I select the CSV file it assumes the date is a character field. I manulaly overrude it by selecting a date field but then no data shows up in Crystal reports.

Phasor