Hi
i try to change the date-format from DD/MM/YYYY
into MM/DD/YY
.
Input-Data:
...
31/12/2013,23:40,198.00,6.20,2,2,2,1,11580.0,222
31/12/2013,23:50,209.00,7.30,2,2,3,0,4380.0
01/01/2014,00:00,205.90,8.30,2,2,3,1,9360.0,223
...
Output-Data should be:
...
12/31/13,23:40,198.00,6.20,2,2,2,1,11580.0,222
12/31/13,23:50,209.00,7.30,2,2,3,0,4380.0
01/01/14,00:00,205.90,8.30,2,2,3,1,9360.0,223
...
i try to do it with awk ....
awk -F'[,|/]' '{ printf "%2d/%02d/%02d,%s,%s,%s\n" $2,$1,$3,$NF}'
but awk "ran out" -- i have still not understand, what awk do with the tripple %s. can someone help me please.
Thanks in advance,
IMPe