'Awk - sort data inside program - custom datetime stamp

I am using gawk to process a large text file. I now have a need to sort a column in the file. Is it possible to use gawk to sort on a column that contains a datetime stamp?

The datetime stamp shown in column 2 is "m/d/yy, H:M AM/PM" in double quotes.

1,”2/1/22, 9:25 AM",
2,"2/8/22, 11:03 AM",
3,"2/7/22, 8:57 AM",
4,"2/18/22, 5:50 PM",
5,"2/24/22, 9:11 AM",
6,"2/7/22, 1:59 PM",
7,"2/9/22, 7:34 AM",
8,"2/16/22, 7:14 AM",
9,"1/31/22, 5:53 PM",

Can I sort that data in gawk, so I can insert a third column and have my table as

9,"1/31/22, 5:53 PM",1
1,”2/1/22, 9:25 AM",2
3,"2/7/22, 8:57 AM",3
6,"2/7/22, 1:59 PM",4
2,"2/8/22, 11:03 AM",5
7,"2/9/22, 7:34 AM",6
8,"2/16/22, 7:14 AM",7
4,"2/18/22, 5:50 PM",8
5,"2/24/22, 9:11 AM",9

Is this possible in gawk?

awk


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source