BUG: to_csv output formatting for datetimes
closes #29711 

…ssue and provides rounding variable to csv formatter to handle datetimes differently. I decided to try and tackle this issue for one of the classes I am in at university. The issue seems to be stemming from the fact that BlockManager is grouping together two differently formatted datetime values in the DataFrame thus making it so the second datetime value is formatted like the first(leading to the trailing zeroes in the example). If you want to format all datetimes the same in the csv you can simply make use of the date_format attribute which the CsvFormatter takes as a variable to format the datetimes however you like. I decided to add a rounding_milliseconds attribute to the csv formatter which would remove  the milliseconds from the end of the datetime if they are all equal to '0'. 

- [x] tests added / passed
- [x] passes `black pandas`
