Re: ssconvert assumes that Excel/xlsx dates are in US locale?



On 14/05/2022 22:35, Morten Welinder wrote:
The devil's in the details here, so please provide a sample file.

And, as always, avoid csv if at all you can.

M.

Hi Morten - files attached (unless they've been stripped); thanks. This is a 2-cell workbook in English/UK locale, with a date formatted as dd/mm/yyyy, from Excel 2019. The csv file is the csv output from an Excel 'Save as', and contains today's date shown as "15/05/2022". 1.12.46 instead produces "05-15-22".

Why csv? My code reads (Windows) spreadsheets and processes them (Linux); they mainly contain dates and times. So, the spreadsheet has to be CSV'ed first. I historically did this with in2csv (Python), but the current in2csv has issues with times, and ssconvert does a better job.

It's not the end of the world to get a US date; I can just use an automatic format instead and add downstream code to process the international date. However, it doesn't seem quite right, so I asked. Thanks.

Attachment: ssconvert-date.csv
Description: MS-Excel spreadsheet

Attachment: ssconvert-date.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]