Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ejonesThe change in format may be something that is being done by the program you are using to view the CSV file. MicrosoftExcel will usually change the date format and display it in the format the Windows operating system is configured to use by default. It does other things that can be maddening or helpful depending on the context like removing zeroes from the beginning of numbers and changing numbers with many digits to scientific notation.
The best way to be sure that the format is being written to the CSV file in the format you want is to view the file in a text editor. In Windows you could use Notepad or the old "type" command at the Dos prompt, in Unix/Linux I often use vi but there are other ways to view text files. And I often use WinSCP to connect to Linux/Unix servers which has a good text editor.