The sample data from csv is shown as follows:
datetime | symbol | price | volume |
---|---|---|---|
10/1/2020 9:00 | XYZ | 10.68 | 375 |
10/1/2020 9:00 | XYZ | 10.9 | 66 |
10/1/2020 9:00 | XYZ | 11.42 | 103 |
10/1/2020 9:00 | XYZ | 12.62 | 280 |
10/1/2020 9:00 | XYZ | 10.73 | 23 |
10/1/2020 9:00 | XYZ | 11.44 | 299 |
I executed the following line to read the data:
schemaTB = extractTextSchema(csvFile)
update schemaTB set type="DATETIME" where name="datetime"
schemaTB[`format]=["M-d-y h:m:s",,,];
t = loadText(csvFile,,schemaTB)
But it report an error:
t = loadText(csvFile, , schemaTB) => Invalid temporal format M-d-y h:m:s