CSV import: error on Date/Time
Author: stockjoey
Creation Date: 5/20/2013 8:10 PM
profile picture

stockjoey

#1
I have a file of data I would like to import but it keeps throwing an error on the datetime field. Any help would be great.

"1/1/2010 1:00:00 AM" is the first entry
profile picture

Eugene

#2
d/M/yyyy H:mm:ss tt

Type it directly into the Date Format field.

Note that your best guide to the date/time format is MSDN. According to the Wealth-Lab User Guide, Data > Data Manager > Create New DataSet > Data Providers > ASCII:

QUOTE:
Date Format

Specifies the description of how dates are formatted in the file. For a specification of the Date and Time Format specifiers, see http://msdn2.microsoft.com/en-us/library/8kb3ddd4(VS.71).aspx

profile picture

pedro1977

#3
Hi Eugene, I have the same problem, have read all the Help, tried variations of the "M/d/yyyy hh:mm:ss tt" format and still getting an error on the Date. I also tried aaaa for year as in the Regional settings (spanish Windows). Complete settings attached. Thank you.


INDFUT,12/21/2001 10:00:00 AM,13320.00,13330.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:01:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:03:00 AM,13300.00,13300.00,13290.00,13290.00,0
INDFUT,12/21/2001 10:04:00 AM,13285.00,13285.00,13285.00,13285.00,0
INDFUT,12/21/2001 10:06:00 AM,13295.00,13300.00,13285.00,13285.00,0
INDFUT,12/21/2001 10:09:00 AM,13310.00,13335.00,13310.00,13335.00,0
INDFUT,12/21/2001 10:10:00 AM,13340.00,13345.00,13335.00,13335.00,0
INDFUT,12/21/2001 10:11:00 AM,13340.00,13340.00,13320.00,13320.00,0
INDFUT,12/21/2001 10:12:00 AM,13320.00,13320.00,13285.00,13285.00,0
INDFUT,12/21/2001 10:13:00 AM,13285.00,13285.00,13270.00,13275.00,0
INDFUT,12/21/2001 10:15:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:16:00 AM,13285.00,13285.00,13285.00,13285.00,0
INDFUT,12/21/2001 10:18:00 AM,13295.00,13295.00,13280.00,13280.00,0
INDFUT,12/21/2001 10:19:00 AM,13280.00,13280.00,13280.00,13280.00,0
INDFUT,12/21/2001 10:20:00 AM,13290.00,13290.00,13290.00,13290.00,0
INDFUT,12/21/2001 10:21:00 AM,13310.00,13310.00,13310.00,13310.00,0
INDFUT,12/21/2001 10:22:00 AM,13315.00,13325.00,13315.00,13325.00,0
INDFUT,12/21/2001 10:23:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:24:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:25:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:27:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:31:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:32:00 AM,13310.00,13310.00,13310.00,13310.00,0
INDFUT,12/21/2001 10:34:00 AM,13320.00,13320.00,13320.00,13320.00,0
INDFUT,12/21/2001 10:35:00 AM,13325.00,13325.00,13325.00,13325.00,0
INDFUT,12/21/2001 10:36:00 AM,13320.00,13320.00,13320.00,13320.00,0
INDFUT,12/21/2001 10:38:00 AM,13320.00,13320.00,13320.00,13320.00,0
INDFUT,12/21/2001 10:39:00 AM,13325.00,13340.00,13325.00,13340.00,0
INDFUT,12/21/2001 10:40:00 AM,13330.00,13330.00,13330.00,13330.00,0
INDFUT,12/21/2001 10:41:00 AM,13330.00,13330.00,13330.00,13330.00,0
INDFUT,12/21/2001 10:42:00 AM,13330.00,13330.00,13330.00,13330.00,0
INDFUT,12/21/2001 10:48:00 AM,13320.00,13320.00,13310.00,13310.00,0
INDFUT,12/21/2001 10:50:00 AM,13320.00,13330.00,13320.00,13330.00,0
INDFUT,12/21/2001 10:51:00 AM,13340.00,13340.00,13340.00,13340.00,0
INDFUT,12/21/2001 10:53:00 AM,13300.00,13300.00,13300.00,13300.00,0
INDFUT,12/21/2001 10:55:00 AM,13305.00,13305.00,13305.00,13305.00,0
INDFUT,12/21/2001 10:58:00 AM,13310.00,13320.00,13300.00,13300.00,0
INDFUT,12/21/2001 11:01:00 AM,13310.00,13310.00,13310.00,13310.00,0
profile picture

Cone

#4
You must type the correct format manually since it is not available in the dropdown. It [probably] is:

M/d/yyyy H:mm:ss tt
profile picture

pedro1977

#5
Yes, thank you for the fast reply. I just tested this format on a smaller sample of the original file and it works. Maybe the file is too big ? It´s a 1-minute series from 2001. 1,386,367 minutes.
profile picture

Eugene

#6
The format can also be M/dd/yyyy H:mm:ss tt or even MM/dd/yyyy H:mm:ss tt - it's impossible to tell precisely by your snippet.

QUOTE:
Maybe the file is too big ? It´s a 1-minute series from 2001. 1,386,367 minutes.

For 32-bit Wealth-Lab, it may be. You will know it by getting an OutOfMemory exception. To work with huge ASCII files you need 64-bit Wealth-Lab.
profile picture

pedro1977

#7
Thank you Eugene. M/d/yyyy h:mm:ss tt worked. I actually had a couple of lines with 00:00:00 in the file (I didn´t see the Date error had changed when I got the format right). Corrected that and everything works.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).