I have some VBA code that generate a CSV file from a Customer database with dates (I need to reed the data in MailChimp).
In the excelfile everything look finde all dates in column is in date format and written as i like dd-mm-yyyy hh:mm:ss (Danish format). (I don't need the time)
But when I (using VBA) convert it to CSV file some of the dates at written incorrect:
Some has changed to mm-dd-yyyy and what was "dd" is written as "mm" (Date of month it changed to month nr.). The cell is in danish date format dd-mm-yyyy
Some has changed to mm/dd/yyyy (dont know if the date of month is changed to month nr.). The cell is in "standard" not date format and if i try to change it to date format (Danish dd-mm-yyyy) nothing happens.
What can I do to make sure dates are being converted correctly in csv?
Original:
06-02-2018 (06-02-2018 17:02:29) (Read in cell)
10-02-2018 (10-02-2018 13:04:54) (Read in cell)
12-02-2018 (12-02-2018 10:20:58) (Read in cell)
16-02-2018 (16-02-2018 12:25:35) (Read in cell)
20-02-2018 (20-02-2018 14:55:01) (Read in cell)
23-02-2018 (23-02-2018 14:41:08) (Read in cell)
27-02-2018 (27-02-2018 10:31:35) (Read in cell)
CSV file aften open in excel:
02-06-2018 (Read in cell as the same whiteout time)
02-10-2018 (Read in cell as the same whiteout time)
02-12-2018 (Read in cell as the same whiteout time)
2/16/2018 (Read in cell as the same whiteout time)
2/20/2018 (Read in cell as the same whiteout time)
2/23/2018 (Read in cell as the same whiteout time)
2/27/2018 (Read in cell as the same whiteout time)
Bookmarks