Solved

C# DateTime insert to DateTime in Access DB

Posted on 2009-07-08
3
1,344 Views
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?
0
Comment
Question by:mdoland
[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
3 Comments
 
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?
0
 
LVL 70

Accepted Solution

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

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.

/gustav
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

730 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