Intraday data import when Date and Time is not separated

Couldn't find information how to import txt intraday data when Date and Time written together

Log: Invalid date format/value

Tried different combinations but no success.
$FORMAT Ticker,Date_YMD Time,Open,High,Low,Close,Volume
$FORMAT Ticker,Date_YMDTime,Open,High,Low,Close,Volume
$FORMAT Ticker,Date_YMDT,Open,High,Low,Close,Volume

I believe your format is not supported. :worried:
Try converting to different format using AFL, Python or others.

This data from
Is there other compatible historical intraday data sources for decent price?
I checked eSignal, IQFeed but found short period intraday data/high price.

Hello @Fiber
By curiosity I visit that website to see what data they provide. So I click on Download button and I saw that they provide different formats under the ""Data Format Options / Preferred Format:""

So i believe you may you have to describe with more details about how you download your data at your end.


Unfortunately it does not solve a problem because non of these settings in data format example has date and time separated.
And didn't get response from their support yet.



You need to find a format with date and time parts separated by at least space (or any other character different than digit). Alternatively you can pre-process files before importing.

Download your EOD file in Spreadsheet format. Once downloaded, open the EOD file with Excel and change the date format from 01-Jan-2019 to 1/1/2019 (mm/dd/yyyy) format and save the CSV file. Use Date_MDY in your Amibroker ASCII import format file.

You don't need to open that in Excel. You can use "spreadsheet" format directly.

AmiBroker's ASCII importer is capable of using short month names (3 letter abbreviations like "Jan", "Feb", ...) instead of numbers so it will just accept
01-Jan-2019 (Date_DMY format).

In case someone needs Python code I got for editing historical intraday data from

import os
import time
from concurrent.futures import ThreadPoolExecutor

count_thread = os.cpu_count()

input_directory = 'start/'   #Начальная директория
output_directory = 'result/'    #Конечная директория
output_suffix = "_new"         #Префикс нового сайта

all_files = []

def get_files():
    print("Получения списка файлов")
    # Получаем список файлов в переменную files
    files = os.listdir(input_directory)

    # Фильтруем список
    filters = filter(lambda x: x.endswith('.txt'), files)
    for file in filters:

def open_file(filename):
    all_lines = []
    start_time = time.time()
    print("Чтение текстового файла", filename)
    with open(filename, "r", encoding='utf8') as file:
        lines ="\n")
        for line in lines:
            if line != "":
    print("Чтение файла " + filename + " закончено:", time.time() - start_time)
    return all_lines

def save_file(lines, output_directory, output_filename):
    print("Сохранение файла", output_directory + output_filename)
    with open(output_directory + output_filename, "w", encoding='utf8') as file:
        for line in lines:
            file.write(line + '\n')

def optimization(line):
    new_blocks = []
    blocks = line.split(",")
    for index, block in enumerate(blocks):
        if(index == 1):
    new_line = ""
    for new_block in new_blocks:
        new_line += new_block + ","
    new_line = new_line[:-1]
    return new_line

def parse(file):
    result_lines = []
    all_lines = open_file(input_directory + file)
    for line in all_lines:
        new_line = optimization(line)

    save_file(result_lines, output_directory, file[:-4] + output_suffix + file[-4:])

def start_threading(files):
    with ThreadPoolExecutor(count_thread) as executor:
        for _ in, files):

if __name__ == '__main__':
    start = time.time()

    if not os.path.exists(output_directory ):  # Если пути не существует создаем его

    # start_threading(all_files)
    for file in all_files:

    print("Скрипт работу закончил. Время выполнения:", time.time() - start)