C# DateTime insert to DateTime in Access DB

Posted on 2009-07-08
Medium Priority
Last Modified: 2012-05-07
I have problem sto insert a DateTime from C# into a Access Table. What format am I supposed to have when inserting it? Are there any location dependent issues?
Question by:mdoland
LVL 33

Expert Comment

by:Todd Gerbert
ID: 24803916
What is the column type in your access database, and how are you [attempting to] insert a DateTime?
LVL 71

Accepted Solution

Éric Moreau earned 2000 total points
ID: 24804080
Usually, sending the date in the yyyy/MM/dd HH:mm:ss format is accepted in all cultures
LVL 53

Expert Comment

by:Gustav Brock
ID: 24804814
A DateTime has no format but if you wish to create an SQL string for the purpose you should use the format mentioned by emoreau.


Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
If you need to implement application level security in an Access database application or other VBA code, I strongly encourage you to take advantage of Active Directory groups.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

619 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