I am trying to change the date format from European to US (yyyy-MM-dd HH:mm:ss) so far I know this should work: 

```
          var dateString = array[4];
            var date = DateTime.ParseExact(dateString, "dd/MMM/yyyy:HH:mm:ss", CultureInfo.InvariantCulture);
            var newDateString = date.ToString("yyyy-MM-dd HH:mm:ss");

            //inserting the new date and time into the array
            array[4] = newDateString;

```

Input: `14/Dec/2014:15:25:34`

However, if i look at the new file the output is in the following format:

```
14/12/2014  15:25:34

```

EDIT:: The error came from this line in my code:

```
 writer.WriteLine(string.Join(",", array.Where(s => !string.IsNullOrEmpty(s))))

```

When changed to 'string.Join(", "... the format was correct.