I have a large .txt file (100m+) rows with 2 duplicated date columns, delimited by comma. I am looking for an efficient way to subtract 1 day from the given date. If the given date is on the 1st of the month, this should be taken care of and output the 30th/31st of the previous month.
I'd like to rename the columns to startDate
and endDate
as well.
Input:
Date,Date
2013-12-21,2013-12-21
2013-01-15,2013-01-15
2019-12-09,2013-12-09
2007-04-01,2007-04-01
2011-01-01,2011-01-01
...
Desired Output:
startDate,endDate
2013-12-20,2013-12-21
2013-01-14,2013-01-15
2019-12-08,2013-12-09
2007-03-31,2007-04-01
2010-12-31,2011-01-01
...