trythis
07-16-2010, 03:54 PM
I have a daily import into Access 2007.
I have attached a sampledata.txt file.
I could not get the date/time fields to import as date and time.
What is the best way to do this. All of the other fields are just numbers or text.
Thank You for the help.
Tina
SteveSchapel
07-16-2010, 08:09 PM
Tina,
I think the best way is to import them into a temporary "holding" table as text data as a first step, and then use a query to append the records to the correct table. In your query, I think you will get the right answer if you do like this:
DateTimeField: DateValue([YourTextField])+TimeValue([YourTextField])
trythis
07-18-2010, 05:35 PM
That worked like a charm.
Since I need this in Military time I can just change the format on the end report or can I change it in the query?
Thanks,
Tina
SteveSchapel
07-18-2010, 07:47 PM
Tina,
You can do either. But my preference would be to use the Format property of the control on the report.
trythis
07-19-2010, 01:18 PM
My next question is about my formulas this now shows as a text field so none of my date formulas will work right?
SteveSchapel
07-19-2010, 02:14 PM
Tina,
No, you should have appended the data to a Date/Time data type field, and the data should now be treated as proper date data. Have you encountered a specific problem?
trythis
07-20-2010, 07:46 AM
No I appended this and it worked great. Not sure what I was thinking.
Thank You for getting me through that.
Tina