Solved

Importing an excel file with a problematic date column

Posted on 2013-06-18
7
513 Views
Last Modified: 2013-06-18
Hi,
I have an excel file (attached ) with one column.
the problem is that this column have defferent formatting for a date.
this what i`m getting from external apps as export.

now i`d like to import this file into access.
but when i do that. it doesn`t recognize the column as a date , but as i text.which i don`t want to.
that`s because of the problem with the format.
how can i import the column as a date (fixing the problem through the importing process in access) , if one may help out , maybe using a vba code . or somethen:}
thnx in regard :}
DateProblem.xlsx
0
Comment
Question by:drtopserv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39256480
import the excel file to a temp table.
use a query to format the dates imported to the temp table and append the result to the destination table.

what date format do you have in your destination table?
0
 

Author Comment

by:drtopserv
ID: 39256547
dd/mm/yyyy
but how can i use a query to format it?
may a sample?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39256569
select cdate(format([datefield],"dd/mm/yyyy"))
from temptable
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:drtopserv
ID: 39256580
but did you see the column in the excel file, it has 2 formats togother in same column
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39256595
yes i did.. try my suggestion so you can see the result after running the query.

you can then convert the query into an append query.



what is your regional setting?

try this query and see which is more likely to return the correct value

SELECT Sheet2.Started, CDate(Format([Started],"dd/mm/yyyy")) AS Expr1, DateValue([Started]) AS Expr2
FROM Sheet2;
0
 

Author Closing Comment

by:drtopserv
ID: 39256857
I LOVE YOU man!! heheh
it works!!! thnx alot..
plz may u have alook at my open Q:ID: 28158731
0
 

Author Comment

by:drtopserv
ID: 39256859
btw, in excel i couldn`t use :CDate or DateValue (didn`t work for me:} )
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question