Advice on exporting a table to a CSV

TonyD1016

Board Regular
Joined
Nov 18, 2021
Messages
59
Office Version
  1. 365
Platform
  1. Windows
I am a novice when it comes to Access but I have an Excel spreadsheet that has grown much too large for Excel to manage and I am in the process of migrating it to Access. I believe I have all of the fields set up correctly but the problem is that I need to be able to export the table as a comma-delimited text file. I am fumbling my way through creating a specification using the Export Text Wizard and I need some advice.

I have a field for daily employee clock-in and clock-out data that is stored as Short Time so it is displayed in 24 hour format, and additionally stores the date along with the time. I really like having this as an option for queries, however when I go to export it shows the time as hh:mm:ss as well as the date. I need it to export the short time as hour and minute and leave out the seconds and the date. I have a similar problem with a field where I enter the employees date of birth. I keep it stored as a date but when I export it I need it to appear as "yyymmmdd" with no additional formatting. I've selected the YMD under date order and left the date delimiter blank to do this, but it also appends a time of 0:00:00. How can I make it leave this time out entirely? Would it be better to store the DOB as a short text field instead?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You can use the FORMAT function in your query to convert these entries to Text values in the exact format that you need.
If they are Text, they will not be converted when exporting to CSV.

See: Format Function
 
Upvote 0
FWIW, I'd say that it's rare that a spreadsheet makes for a good db table. You might get this figured out only to find that it's horribly un-normalized (is that a word?) and you have a tough time doing anything with it. If you are not familiar with database normalization I strongly suggest you look into that before doing anything else.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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