CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Storing and retrieving dates from MS Access using C#

  1. #1

    Storing and retrieving dates from MS Access using C#

    Hello,

    I am facing difficulty in storing date in MS Access using C# code. I have tried to save the DateTime object into the database. The column in the database was also of DateTime datatype. but I could not save the date. It gave me syntax error.

    Then I tried to save the date as a String. But this time the date got saved in the database as some decimal. Plz help me in this regard. How to save the date in MS Access.

    Thanking you,

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,980

    Re: Storing and retrieving dates from MS Access using C#

    Quote Originally Posted by quincydur1998 View Post
    Hello,

    I am facing difficulty in storing date in MS Access using C# code. I have tried to save the DateTime object into the database. The column in the database was also of DateTime datatype. but I could not save the date. It gave me syntax error.

    Then I tried to save the date as a String. But this time the date got saved in the database as some decimal. Plz help me in this regard. How to save the date in MS Access.

    Thanking you,
    Please, show us how you tried to do it.
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2020
    Location
    Earth
    Posts
    4

    Re: Storing and retrieving dates from MS Access using C#

    What error do you have, any screenshots?

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,477

    Re: Storing and retrieving dates from MS Access using C#

    Quote Originally Posted by Baileybob View Post
    What error do you have, any screenshots?
    No screenshots please, just include the code snippet and the error.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)