Change date format in a file.

Hi all,

I have a file as below,
i would like the change the format of the time from "11/7/2019 20:12" to "2019-07-11 20:12:00" in the last coloumn.
any awk solution on this.

Input:

2,0,695016,1961612,497212,5800804,0,0,161,33,7605,12226,23,10,66,0,0,34,11/7/2019 20:10
2,0,695016,1983608,497340,5800980,0,0,1,519,8293,14073,20,4,76,1,0,24,11/7/2019 20:11

o/p shoud be:

2,0,695016,1961612,497212,5800804,0,0,161,33,7605,12226,23,10,66,0,0,34,2019-07-11 20:10:00
2,0,695016,1983608,497340,5800980,0,0,1,519,8293,14073,20,4,76,1,0,24,2019-07-11 20:11:00

i wrote one script but taking long time and looking for an easy solution in awk.

Show your script.

while IFS= read -r line
do
  mydate=$(grep -Po '[0-9]+/[0-9]+/[0-9]+' <<< "$line") 
  # perform the replacement in case there is date to process
  if [[ ! -z "$mydate" ]]; then
     newdate=$(date -d"$mydate" "+%Y-%m-%d") 
     sed -i "s#$mydate#$newdate#" file       
  fi
done < file

But taking long time ..looking for awk

OK, try

awk -F, '/([0-9]+[\/ :])+[0-9]+/ {split ($NF, T, /[\/ :]/); $NF = sprintf ("%d-%02d-%02d %d:%d:00", T[3], T[2], T[1], T[4], T[5])} 1' OFS=, file

it worked
thanks.