Unable to import dates

Installation Forum (Inactive)
Unable to import dates Lind-Thomsen  2015-09-09 06:29
Status: Closed
 
Hi all

I'm just starting up learning labkey.

Following the tutorial on importing the 'Physical exam' dataset I can't get the dates right. (https://www.labkey.org/wiki/home/Documentation/page.view?name=simpleDataTablesTutorial1)

  • in the excel sheet the format is '15-08-2008'
  • it correctly guess the format as DateTime
  • in the preview it says '15-08-2008 00:00:00'
  • on importing it gives an error:
Date: Could not convert 'Fri Aug 15 00:00:00 CEST 2008' for field Date, should be TimeStamp
  • The underlying format in excel i a number (when converted to text)
If I convert to a TSV file it works ok. I think this error propagates into the rest of the tutorials where timepoints is used because they don't work as expected. Is there any settings that can cause/solve this?

I'm using labkey 15.2.

best wishes

Allan Lind-Thomsen

 
 
adam responded:  2015-09-09 06:59
I haven't tested this with your scenario, but you could try adjusting the "date parsing mode" of your server to "Non-U.S. date parsing (DMY)". Admin Console -> Look and Feel Settings.

https://help.labkey.org/wiki/home/Documentation/Archive/15.2/page.view?name=customizeLook

Let us know if that helps...

Adam

 
Lind-Thomsen responded:  2015-09-09 23:07
Hi Adam

The setting was already in non-us state. I tried setting it to US state but it didn't help.

Best wishes Allan

 
Jon (LabKey DevOps) responded:  2015-09-10 14:25
Hi Allan,

Can you provide us with the build number of your 15.2 version of LabKey 15.2? You can obtain this by going to Admin > Site > Admin Console and then clicking the + sign next to the word "Core" in the Module Information section.

I want to try and reproduce the same conditions via the same version of LabKey you're running. So far, in my version of 15.2, I cannot reproduce the same problem you described, even after editing my excel spreadsheet to use the different date format of dd-MM-yyyy like you have rather than yyyy-MM-dd like we have by default.

Regards,

Jon
 
Lind-Thomsen responded:  2015-09-10 23:14
Hi Jon

Thanks for your effort.

The build is 39349.20

The misbehaviour was also present in the 14.3 version (build 35337) I upgraded from so I think it is a configuration problem that got inherited.

It is running on a danish windows 8 system.

I don't know if it is related but when I import an external table from our database the dates comes out as string, I can however make a query where I cast the datefield into a date.

Best wishes
Allan
 
Lind-Thomsen responded:  2015-09-11 00:26
Hi Jon

I think I got it.
I'm using MS office 2010, If open the 'phys exam' excelfile which is in Excel 97-2003 and save it in the newest format then it works.

Do you know of any ways to import older format files?

best wishes
Allan
 
Jon (LabKey DevOps) responded:  2015-09-14 13:47
Hi Allan,

I personally haven't heard of any problems like this on a version level, but I will take a look into this.

In the meantime, could you possibly provide us with two copies of your phys exam file? We would need one version of the excel file that didn't work for you and the other that did work for you. This will ensure that I can attempt to reproduce the problem on my end when doing my testing.

Regards,

Jon
 
Lind-Thomsen responded:  2015-09-14 23:35
Hi Jon

Thanks for your effort.

Here is the two files.

Best wishes
Allan
 
Jon (LabKey DevOps) responded:  2015-09-16 21:58
Thanks Allan,

It looks like both files appeared to upload without issue for me. I am however running on a Mac using Google Chrome. I will re-attempt this again via my Windows 8.1 VM and Chrome from there as well.

Regards,

Jon
 
Jon (LabKey DevOps) responded:  2015-09-16 22:20
Hi Allan,

Seems that my version of Windows 8.1 Pro, even when swapping out the language in both the browser and operating system will not reproduce the problem you experienced. Both files when creating a new dataset in the same build of LabKey 15.2 upload without issue.

I did notice one thing that was interesting. In the file labeled "doesn't work", I saw the date with a time of 00:00 for the records in the preview while the one with "works" just shows a date.

In the version one that doesn't work, is it possible for you to change the format to be just a date column rather than datetime and try uploading it again?

Regards,

Jon
 
Lind-Thomsen responded:  2015-09-17 06:36
Hi Jon

I have tried to change the format to date and text, but then I get a new error:

org.apache.poi.ss.formula.eval.notimplementedexception: error evaluating cell data!F2

Most of our data is in databases so import of excel sheets is not that relevant for now.

Best wishes
Allan
 
Lind-Thomsen responded:  2015-09-17 06:37
Hi Jon

I have tried to change the format to date and text, but then I get a new error:

org.apache.poi.ss.formula.eval.notimplementedexception: error evaluating cell data!F2

Most of our data is in databases so import of excel sheets is not that relevant for now.

Best wishes
Allan