Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In my form application I am connected to my access database (mydatabase.mdb) and in a table I have field with the date/time property but it seems that i can only store "Text" or "String" if I use my form.

I want to store the date as dd-mm-yyyy and that it is saved as a DateTime value and not like a string.

For the date input I use a DateTimePicker.

it is binded like this:
OrderDate.Databinding.Add(new Binding("Text",Connection1.Bindingsource,"OrderDate"));

I hope someone can help me.
Posted

1 solution

You may want to try using a Date again, but this time make sure that your range of dates falls within the acceptable range of dates for a database.

The range of a DateTime is larger than a date allowable in MS SQL.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900