Dan Nielsen
New Member
- Joined
- Jan 10, 2018
- Messages
- 6
I need to export data from a excel file to a CSV file (to use for import in MailChimp) using VBA. I have dates in columns and in excel (* .xlsm) dates are correct, but after they are copied to * .CSV and I open the * CSV file again, some dates are not correct.
I have checked that all cells in the columns are in the format "date" in *.xlms but in *.CSV some is "standard" and some is "date".
Can I possibly Convert all dates into text in an easy way with a simple VBA command?
[TABLE="width: 500"]
<tbody>[TR]
[TD]*.xlms[/TD]
[TD][/TD]
[TD]*.CSV[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 105"]
<colgroup><col></colgroup><tbody>[TR]
[TD="align: right"]29-02-2016[/TD]
[/TR]
[TR]
[TD="align: right"]29-02-2016[/TD]
[/TR]
[TR]
[TD="align: right"]25-09-2017[/TD]
[/TR]
[TR]
[TD="align: right"]09-10-2017[/TD]
[/TR]
[TR]
[TD="align: right"]06-01-2018[/TD]
[/TR]
[TR]
[TD="align: right"]01-03-2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][TABLE="width: 90"]
<colgroup><col></colgroup><tbody>[TR]
[TD]2/29/2016[/TD]
[/TR]
[TR]
[TD]2/29/2016[/TD]
[/TR]
[TR]
[TD]9/25/2017[/TD]
[/TR]
[TR]
[TD="align: right"]10-09-2017[/TD]
[/TR]
[TR]
[TD="align: right"]01-06-2018[/TD]
[/TR]
[TR]
[TD="align: right"]03-01-2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have checked that all cells in the columns are in the format "date" in *.xlms but in *.CSV some is "standard" and some is "date".
Can I possibly Convert all dates into text in an easy way with a simple VBA command?
[TABLE="width: 500"]
<tbody>[TR]
[TD]*.xlms[/TD]
[TD][/TD]
[TD]*.CSV[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 105"]
<colgroup><col></colgroup><tbody>[TR]
[TD="align: right"]29-02-2016[/TD]
[/TR]
[TR]
[TD="align: right"]29-02-2016[/TD]
[/TR]
[TR]
[TD="align: right"]25-09-2017[/TD]
[/TR]
[TR]
[TD="align: right"]09-10-2017[/TD]
[/TR]
[TR]
[TD="align: right"]06-01-2018[/TD]
[/TR]
[TR]
[TD="align: right"]01-03-2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][TABLE="width: 90"]
<colgroup><col></colgroup><tbody>[TR]
[TD]2/29/2016[/TD]
[/TR]
[TR]
[TD]2/29/2016[/TD]
[/TR]
[TR]
[TD]9/25/2017[/TD]
[/TR]
[TR]
[TD="align: right"]10-09-2017[/TD]
[/TR]
[TR]
[TD="align: right"]01-06-2018[/TD]
[/TR]
[TR]
[TD="align: right"]03-01-2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]