问题描述
在我的表单应用程序中,我连接到访问数据库(mydatabase.mdb),并且在表中我具有带有date/time属性的字段,但是,如果使用表单,似乎只能存储文本"或字符串".
我想将日期存储为dd-mm-yyyy,并将其保存为DateTime值而不是字符串.
对于日期输入,我使用DateTimePicker.
它是这样绑定的:OrderDate.Databinding.Add(new Binding("Text",Connection1.Bindingsource,"OrderDate"));
我希望有人可以帮助我.
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.
推荐答案
这篇关于在数据库中保存日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!