Exporting text date in CSV

billy1989

New Member
Joined
Mar 22, 2023
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi guys - I have the following formula set up to give me the date and month of a year

Excel Formula:
=IF(A5="","",LEFT(TEXT(A5,"dd/mm"),5))

So it will show the date and month eg 01/07. But when I export to a CSV, it saves as 01-Jul - how can I stop it from doing this? It's driving me nuts!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
The LEFT function serves no purpose. This should be fine:
Excel Formula:
=IF(A5="","",TEXT(A5,"dd/mm"))
When you look at it before exporting does it look fine/correct?

If it does, then it actually is most likely working, and the mistake you are probably making is trying to view a CSV in Excel.
If you truly want to see what is in a CSV file, NEVER use Excel to view it! Excel will perform its own conversions on the data automatically upon opening it.
View the CSV file in a Text Editor, like NotePad, and you will see what is really in the CSV file.
 
Upvote 0
The LEFT function serves no purpose. This should be fine:
Excel Formula:
=IF(A5="","",TEXT(A5,"dd/mm"))
When you look at it before exporting does it look fine/correct?

If it does, then it actually is most likely working, and the mistake you are probably making is trying to view a CSV in Excel.
If you truly want to see what is in a CSV file, NEVER use Excel to view it! Excel will perform its own conversions on the data automatically upon opening it.
View the CSV file in a Text Editor, like NotePad, and you will see what is really in the CSV file.
Whoops, had been looking at formulae for so long I missed that I could have removed that!

Before export it's fine, but I need to go in and remove some columns after export.
 
Upvote 0

Forum statistics

Threads
1,215,348
Messages
6,124,425
Members
449,157
Latest member
mytux

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top