I have a requirement where I need to get the value from the header of a CSV file and add that to the body of the file. The catch in this is that, the header value is a date value but I want the date format to be changed when it is copied in the body.
Input File:
Code: Select all
"Version 1.0"
"As Of Date: 13-Aug-2015"
"value1","value2","value3"
"value11","value12","value13"
"value21","value22","value23"
Desired Output File:
Code: Select all
"value1","value2","08/13/2015","value3"
"value11","value12","08/13/2015","value13"
"value21","value22","08/13/2015","value23"
I am able to get rid of the header files and generate a new file only with the values, but I'm unable to get the date into my values. Please help me in achieving the desired output.
Thanks,
Shaswat