By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,896 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,896 IT Pros & Developers. It's quick & easy.

Importing Dates in MMDDYYYY format from Excel into Access Tables

100+
P: 153
Howdy...haven't used Access for a while, but now I'm getting back into it and can't seem to figure out how I can import data from an excel table that outputs the date in the formate of MMDDYYYY. I figure there's gotta be some easy way to do this rather than reading through the string with a mid function or something along those lines. Any help would be greatly appreciated.

Cheers!
Oct 4 '07 #1
Share this Question
Share on Google+
7 Replies


FishVal
Expert 2.5K+
P: 2,653
Howdy...haven't used Access for a while, but now I'm getting back into it and can't seem to figure out how I can import data from an excel table that outputs the date in the formate of MMDDYYYY. I figure there's gotta be some easy way to do this rather than reading through the string with a mid function or something along those lines. Any help would be greatly appreciated.

Cheers!
Nothing to work around. Access normally imports dates from Excel, no matter how they are formatted.

Kind regards,
Fish
Oct 6 '07 #2

100+
P: 153
Nothing to work around. Access normally imports dates from Excel, no matter how they are formatted.

Kind regards,
Fish
Well the dates in the excel sheet are in a general field and the program that exports this list doesn't export them with delimiters so it would be a value like 10061982 and although I import this field directly into a date field in Access, it gives me an error that it can not be added.
Oct 8 '07 #3

FishVal
Expert 2.5K+
P: 2,653
Well the dates in the excel sheet are in a general field and the program that exports this list doesn't export them with delimiters so it would be a value like 10061982 and although I import this field directly into a date field in Access, it gives me an error that it can not be added.
I see two options:
  • format cells as dates
  • parse cell content with mid function
    Expand|Select|Wrap|Line Numbers
    1. dateserial(mid("10061982",5,4),mid("10061982",1,2),mid("10061982",3,2))
    2.  
Oct 8 '07 #4

100+
P: 153
I see two options:
  • format cells as dates
  • parse cell content with mid function
    Expand|Select|Wrap|Line Numbers
    1. dateserial(mid("10061982",5,4),mid("10061982",1,2),mid("10061982",3,2))
    2.  
Hmm looks like I'll have to use the mid...was hoping there would have been a way to avoid that lol. Thanks!
Oct 8 '07 #5

FishVal
Expert 2.5K+
P: 2,653
I don't state that there is no "other way" unknown for me. Just in a situation like your one I would go with string functions and nether bother about perfect/easiest ways as soon as after import the data is in suitable type/format.

Best regards,
Valentine
Oct 8 '07 #6

100+
P: 153
I have absolutely no clue what you meant to say there :)
Oct 9 '07 #7

FishVal
Expert 2.5K+
P: 2,653
:)

Nevermind. I just often have to decide whether to go with possibly not perfect but working solution or to wait until enlighten me.

Kind regards,
Fish
Oct 9 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.