MS Access Date/Time Vs SQL Server DateTime2

Hi Experts!

I have another issue on the Datetime2 in SQL Server Back end not able to match Ms Access Date/Time format as result all my reports are pulling incomplete data due to failure of MS Access to read the Datetime2 format. I suspect it is treated as string instead of Date, in some cases it is coming on my reports as 2017-12-02-00 which very unusual.

Is there a solution to this out there,I will highly appreciate your help on this.

Regards

Chris
LVL 3
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
This is actually not a failure of Access. It is a failure of the DRIVER you are using to talk to SQL server. The driver that comes pre-installed with windows is plain "SQL SERVER" and dates back to 2005 I believe.  The DateTime2 is a newer datatype, and thus the old driver simply doesn't understand how to handle it, and defaults to text.

So you really have 2 options:
Option A)
Use DateTime instead of DateTime2

Option B)
Use a newer driver, such as the ODBC 17 driver. The downside is that you now have to distribute and install this driver to all your users. This might be easy as pie, if every user has local admin rights, or it might be a painstaking process to get IT to install it depending on how helpfull the local IT group is.
5

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MishaProgrammerCommented:
You can change your queries to convert results to display correct date.
You can use this code:
declare @date date=getdate()
select convert(varchar(16), @date, 105)

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.