When asking customers to enter their address details online, the data is downloaded to our server as a csv file. Some customers enter their address details in a way that turns the output in the csv file to a date , e.g 2/6 which should be reflecting unit 2, 6 (High St) is turned into Feb 6. Any suggestions on how to deal with this via coding at our end as opposed to hoping customers enter the details correctly?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
how to prevent date formatting in csv files
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » how to prevent date formatting in csv files
- This topic has 4 replies, 4 voices, and was last updated 3 years, 4 months ago.
Viewing 3 reply threadsAuthorReplies-
zat_so
AskWoody Plus -
Sky
AskWoody PlusOctober 18, 2021 at 10:24 am #2396483Excel is so bad at dealing with CSV files and has been for years, it’s infuriating. LibreOffice knows how to deal with them!
I’ve given this some thought and I have three thoughts:
1) Add an optional Unit input box to the form. This is the best solution that I can think of as it maintains exactly what the customer wants and keeps the pieces of data separate. If you want to make it more readable for the company then, when processing the form data, concatenate 2 into “Unit 2” IF the input box contains data.
2) If 1 is not possible, a simple hack would be to force 2/6 into a string by concatenating 2/6 into ” 2/6″ when processing the form data. Note the space before 2/6. I don’t have access to Excel right now, but this should keep it as a string I think?
3) You may want to be more thorough than 2 by using a regular expression search and replace to convert 2/6 into “Unit 2, 6”. This would be less reliable, however, since there might be variations on 2/6 entered.
Overall, I would recommend 1 if at all possible.
Hope this helps.
-
b
AskWoody_MVPOctober 18, 2021 at 11:32 am #2396508Could one of these three techniques be useful?
Stop Excel from Converting Text to Number or Date format when Opening a CSV file
Perhaps the third option would be appropriate?
Option 3: Formatting the CSV file so that Excel doesn’t convert the data format
-
beethoven
AskWoody PlusOctober 18, 2021 at 3:48 pm #2396576thank you – I will have to look closely at some of the suggestions but just to clarify,
the processing is being done in csv – I do not need or want to convert the file to excel – in fact once the file has been amended with respect to any incorrect address details, the next step of processing, uploading the file into another program has to be in csv format. I guess my misunderstanding is that I do open the file via excel and make changes that way, though I save back as csv.
Using input boxes would be an idea but I am wary that there are too many options/variations with respect to addresses:
5 High St = normal residential address
3-5 High St = normal residential address
3/5 High St – Unit/Apartment (proper way to enter it)
Unit 3, 5 High St – Unit and how some customers will enter it
Villa 3, 5 High St (Retirement Village)
PO Box 53 ( other option)
plus a number of other variations.
I am somewhat realistic in not expecting to get a perfect file unless subscribing to a full address validation program, so I probably will have to continue having some cleanup work each day before uploading the amended file, just want to reduce the work and avoid the most common/obvious issues like dates.
Viewing 3 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Expand the taskbar?
by
CWBillow
4 hours, 14 minutes ago -
Gregory Forrest “Woody” Leonhard (1951-2025)
by
Susan Bradley
54 minutes ago -
March 2025 updates are out
by
Susan Bradley
8 hours, 6 minutes ago -
Windows 11 Insider Preview build 26120.3380 released to DEV and BETA
by
joep517
16 hours, 9 minutes ago -
Update Firefox to prevent add-ons issues from root certificate expiration
by
Alex5723
23 hours, 18 minutes ago -
Latest Firefox requires Password on start up
by
Gordski
17 hours, 52 minutes ago -
Resolved : AutoCAD 2022 might not open after updating to 24H2
by
Alex5723
1 day, 12 hours ago -
Missing api-ms-win-core-libraryloader-11-2-1.dll
by
IreneLinda
10 hours, 54 minutes ago -
How Much Daylight have YOU Saved?
by
Nibbled To Death By Ducks
13 hours, 51 minutes ago -
A brief history of Windows Settings
by
Simon Bisson
7 hours, 30 minutes ago -
Thunderbolt is not just for monitors
by
Ben Myers
6 hours, 6 minutes ago -
Password Generators — Your first line of defense
by
Deanna McElveen
11 hours, 33 minutes ago -
AskWoody at the computer museum
by
Will Fastie
7 hours, 9 minutes ago -
Planning for the unexpected
by
Susan Bradley
12 hours, 33 minutes ago -
Which printer type is the better one to buy?
by
Bob99
1 day, 13 hours ago -
Upgrading the web server
by
Susan Bradley
1 day, 12 hours ago -
New Windows 11 24H2 Setup – Initial Win Update prevention settings?
by
Tex265
2 days, 7 hours ago -
Creating a Google account
by
DavidofIN
2 days, 6 hours ago -
Undocumented “backdoor” found in Bluetooth chip used by a billion devices
by
Alex5723
2 days, 12 hours ago -
Microsoft Considering AI Models to Replace OpenAI’s in Copilot
by
Alex5723
2 days, 23 hours ago -
AI *emergent misalignment*
by
Alex5723
3 days ago -
Windows 11 Disk Encryption/ Bitlocker/ Recovery Key
by
Tex265
1 day, 8 hours ago -
Trouble signing out and restarting
by
Tech Hiker
7 hours, 57 minutes ago -
Windows 7 MSE Manual Updating
by
Microfix
4 hours, 44 minutes ago -
Problem running LMC 22 flash drive
by
Charlie
2 days, 7 hours ago -
Outlook Email Problem
by
Lil88reb
2 days, 8 hours ago -
“Microsoft 365 Office All-in-One For Dummies, 3rd Edition FREE
by
Alex5723
2 days, 15 hours ago -
Cant use Office 2013 – Getting error message about Office 2013
by
SAAR
3 days, 8 hours ago -
Nearly 1 million Windows devices targeted in advanced “malvertising” spree
by
bbearren
3 days, 8 hours ago -
Windows 11 Insider Preview build 27808 released to Canary
by
joep517
4 days, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.