Comparing adjacent time stamps
The code is way too "linear", too deep, too hard to follow with all the indexing and generic column-cell referencing.


I prefer foreach over for.  Simpler, cleaner, easier to read. 
For each row, you can reference the DataGridViewCellCollection property by column name-value: theRow.Cells['theColumnName'].Value 
Create a method that takes a DataGridViewRow parameter and simply copies its column values into a "CSVrow" object - a class you create.


override ToString and build the CSV string there.

Create a "CSVrowCollection" class to hold the CSV objects.


Its main purpose is to build the CSV file. Do this in a ToString override



.

class CSV {
    public CSV (DataGridViewRow timeStampRow) {  }

    public override string ToString() {
        // note the single quote characters wrapping the complete string
        return string.Format('"{0}","{1}","{2}","{3}","{4}","{5}"', 
                            Timestamp, Value, Events, Comment, User);
    }
}

class CSVcollection {
    protected List&lt;CSV&gt; CsvList { get; set; }

    public void Add(CSV aCsvObject) { }

    public override string ToString() {
        // building the value names string not shown.
        StringBuilder me = new StringBuilder();  //System.Text

        foreach (var record in CsvList)
           me.AppendLine(record);  //implicit ToString call

        return me.ToString();
    }
}