some of the date fields show as date/time and some as text.
Main Topics
Browse All TopicsI imported a text file from a lotus approach database into ms access. the date field is 1/27/1995 and i would like to convert it to an integer date field where it will read 12795. From there i will export the data to a sql table where it is defined as an integer. Please help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
It was supposed to be the new field you created in the table. Just so all prefixes add up, we create a new field in the table named fldDateLng (Integer won't cut it). Then we run this query:
UPDATE myTable SET fldDateLng=Int(fldDate);
Note the Int() function produces the integer value of a number, not an Integer datatype.
Too much confusion here.
1. The integer value requested is not the numeric value of a date value but a value from the formatted date. Thus values will fall between 10100 and 123199 and the data type of the new field must be Long.
2. The conversion is taking place in Access. Thus an update query will use Access SQL.
3. Data export will happen later.
So all that is needed is a simple update query in Access:
UPDATE
tblYourTable
SET
YourLongField = Val(Format([YourDateField]
/gustav
Business Accounts
Answer for Membership
by: peter57rPosted on 2009-04-01 at 12:45:14ID: 24043124
What datatype does it show as in the Access table?