• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Leading zero in date format lost when using .CSV file

I need to upload a .CSV file with dates in the following format: dd/mm/yyyy.

I have February 19, 2019 as 2/19/2019. I tried an apostrophe then a leading zero. When I reopen the file, the date goes back to 2/19/2019.

I tried date formatting and custom data formatting as dd/mm/yyyy. When I reopen the file, it goes back to 2/19/2019.

Is there anything else I can do? I need the date to be displayed as 02/19/2019.

Edit: Rather than leading zeros before a date, what about leading zeros before a number such as 0000? I want to open the .CSV file and still see 0000. I don't want to import the .CSV file into Excel or a text file.
 
Last edited:
Only if the value is saved as 02/19/2019 it will open with that value if opened as text.
So do not open de csv in Excel, use a text import and define it as TEXT.

Column A was the result of opening a csv in Excel (recognized as date automatically and losisng the leading "0")

Column E is the result of the import.
upload_2019-3-20_18-50-17.png

So open your csv in a notepad and look if the leading "0" are there. I doubt it is when using a "format" in Excel and saving it as .csv.
 
Back
Top