I've got a series of CSV files whose second field is dates:
R.OUSE BOURTON MILL,2000-03-22T14:50:00,Ammoniacal Nitrogen as N,0.03,mg/l
How can I change the date format into DD/MM/YYYY for all files? The measurement time is not needed.
Thank you so much
With miller, using its builtin
strptime
andstrftime
functions :Why bash?
From command line:
Result:
Here's a reasonable solution using
bash
anddate
:Match and rearrange time components with awk gensub.
(nawk version):
if the intention is to only convert the time format, then epoch is probably a better choice.