I have a situation in which I have multiple (3 at last count) date columns in a CSV file (, delim), which need to be changed from:
January 1 2017 (note, no comma after day)
to:
YYYY-MM-DD
So far, I am able to convert a date using: date --date="January 12, 1990" +%Y-%m-%d
However, I need to read a specific column in the CSV, then replace what's there with the new format. It doesn't matter which commonly used GNU utility I use, I just need to do it.
So far, I have been trying to write an AWK function in a BASH shell script to do it, but I'm completely lost.
Can anyone offer suggestions on the easiest way to accomplish this from within a BASH script? The attached sample.txt gives an idea of what the data looks like, only greatly reduced. The really data has about 3000 rows and 35 columns.