moissinac / csvfix

Automatically exported from code.google.com/p/csvfix
MIT License
0 stars 0 forks source link

Support for yy in Dates #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make a XLS with a date like '01-Jan-11'
2. Export the XLS as CSV 
3. Try to process with iso_date

What is the expected output? What do you see instead?

csvfix date_iso -f 1 -m 'dd-mmm-yy' filename.csv
ERROR: Invalid date mask: dd-mmm-yy

What version of the product are you using? On what operating system?

Mac OS X Lion

Please provide any additional information below.

http://csvfix.byethost5.com/files/date_format.html says that 2 character years 
are not supported. That's a shame as it is a common default.

Original issue reported on code.google.com by mrjclea...@gmail.com on 6 Sep 2011 at 4:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Two digit years are supported - you are misusing the mask. The mask must always 
be exactly 5 characters long, so d-m-y or d-y-m are valid masks. The mask 
specifies two things - the order of the day, month and year, and the separator 
character between them. So, your command should read:

csvfix date_iso -f 1 -m 'd-m-y' filename.csv

If you have any other problems with this or any other CSVfix commands, please 
ask about them in the support forum at http://groups.google.com/group/csvfix 
first, before raising an issue.

Original comment by nbutterworth1953@gmail.com on 7 Sep 2011 at 9:48