Question about ASCII import using OLE

we have been using the following format for close to 4 years and never had a problem

# Format definition file generated automatically
# by AmiBroker's ASCII Import Wizard
$FORMAT Ticker, Date_DMY, Time, Open, High, Low, Close, Volume, Aux1, Aux2
$SKIPLINES 1
$SEPARATOR ,
$CONT 1
$GROUP 255
$AUTOADD 1
$DEBUG 1
$ALLOWNEG 1

The data files look like (10 example lines):

symbol,date,time,open,high,low,close,volume,buyvolume,sellvolume
@ES#,291224,180000,6028.75,6036.25,6027.5,6034.25,1016,665.0,328.0
@ES#,291224,180100,6034.0,6035.25,6032.25,6032.5,339,171.0,168.0
@ES#,291224,180200,6032.5,6032.75,6029.5,6030.75,208,90.0,118.0
@ES#,291224,180300,6030.75,6033.5,6030.75,6033.0,271,197.0,74.0
@ES#,291224,180400,6033.0,6033.25,6032.0,6032.0,79,26.0,53.0
@ES#,291224,180500,6032.0,6032.25,6029.5,6029.75,176,75.0,101.0
@ES#,291224,180600,6029.5,6030.0,6028.25,6029.75,272,157.0,115.0
@ES#,291224,180700,6029.5,6031.25,6029.5,6031.0,136,103.0,33.0
@ES#,291224,180800,6030.75,6031.25,6030.5,6030.75,93,57.0,36.0

When importing data from 1/1/2025 it imports them as 1925 instead of 2025. The data looks the same as data that worked before (10 example lines):

symbol,date,time,open,high,low,close,volume,buyvolume,sellvolume
@ES#,010125,180000,5949.25,5949.75,5943.25,5945.5,1369,711.0,480.0
@ES#,010125,180100,5945.5,5946.75,5943.75,5946.5,412,246.0,166.0
@ES#,010125,180200,5946.5,5949.0,5946.5,5948.5,427,237.0,190.0
@ES#,010125,180300,5948.75,5951.75,5948.25,5951.0,491,272.0,219.0
@ES#,010125,180400,5951.25,5954.5,5951.0,5954.25,486,265.0,221.0
@ES#,010125,180500,5954.5,5955.5,5952.75,5953.0,391,157.0,234.0
@ES#,010125,180600,5953.25,5953.25,5951.75,5952.5,185,63.0,122.0
@ES#,010125,180700,5952.5,5952.5,5951.0,5951.5,207,77.0,130.0
@ES#,010125,180800,5951.75,5953.75,5951.0,5953.25,210,141.0,69.0

These last lines it imports as 1925 instead of 2025. Do we need to format the date differently? And why so because it was working in 2024. Thank you.

1 Like

Instead of 291224, it should be 12/29/2024. This is the date format I use for Date_MDY Ascii import. Since you are using Date_DMY, then it should be 29/12/24 or 29/12/2024.

1 Like

hi, thanks. Yes it says so here OLE

However, I used the format shown above for years and also the examples I found use that. I will try if that works.

I use the forward slash "/" as separator for the day, month and year. This may solves your problem.

thank you, Will try that

@Peter2047 its not the slash as a separator being the cause

Ed, use full datenum format. its not ambiguous.
01012025 as opposed to 010125 Date_DMY

thank you. I will have to try some things out. Strange thing is that it understands 291224 but it doesn't understand 010125. I will try some other formats and see what works. But the full year has to solve it. Not sure why we used %y instead of %Y in the first place

date packing/unpacking is a bit of trickery :slight_smile:

1 Like

You need to use FOUR DIGIT year (YYYY) Two digit year (YY) is obsolete since 2000.

1 Like

thanks, yes that worked. Not sure why we used two digits but it has been working all the time.

It worked only because you were given 25 years to adjust your code NOT to use YY (two digit year).

3 Likes

I didn't know that, thanks. I am not sure why we were using that format in the first place.

@Tomasz,
I was referring to the on-line user guide. It's still show both YY and YYYY but with "/", "-" and "." as the delimiters. I am using MM/DD/YYYY. Maybe the 6.90 User's Guide should be updated. Thanks.

Separators don't really matter. They are just skipped.

Sorry, I shouldn't be focusing on the separators. There are 2 digits year examples in the 6.90 User's Guide(page 473/474). They should be removed since it's already obsolete.