Euthanasia for promising ideas

Date Format Conversion

2017/06/11 – 18:43

Shortcut: Javascript Date Format Conversion

I recently had trouble to convert a date column from a CSV file to another (sorting-friendly) format. In LibreOffice >=5.3.x. In my case I wanted to convert from M-D-Y with no leading zeros, “/” as separator and 2-digits year to something like “yyyy-MM-dd” (i.e. 4-digits year, leading zeros and “-” as separator) for importing the file to another CSV file. I wanted to sort this document by date which doesn’t work with the M-D-Y format.

What I had: M/D/Y, no leading zeros, slash-separator, only two-digits year)

What I wanted: Y-M-D, leading zeros, – as separator, 4-digits year

 

What I got (nothing happened at all… )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I have tried numerous combinations of CSV import options and conversion parameters. I have spent some time googling for solutions, but most of them were dirty hacks and provided no permanent solution. Maybe it is related to the fact that my Ubuntu’s language is set to English(US) but the date/time/number formats are set to German. In the end I gave up.

And made this:

jdfc

Javascript Batch Date Format Conversion https://dfc.dennis2society.de

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Javascript Date Format Conversion

Post a Comment

Insert a smiley:


To prevent spam and comments of people who don't
know about mathmatics you have to enter the result
into the field on the right side.
Hint: Possible answers are '-3', '-2', '0', '1' and '6x'.
Some challenges have more than one correct answer!
Spam protection

Captcha