0

I am using vb.net to store value into .accdb file. In my form I have a box with date and it shows current date. Tried to print it out in a MsgBox and it shows the date correctly but when I store it inside .accdb file it says that the date is 1905-05-31 WTF??? I have no idea where it is coming from.

DateTimePickerIFT.Text (it is actually DateTimePicker IFT at the end is how I name it)

This is how I get my date from DateTimePicker box. I have noticed if I move the date one day back the value stored is 1905-06-01 which is (2012-10-23 in a datepickerbox) and when I get 1905-05-31 selected date is (2012-10-24). I am not initializing date anywhere just getting it from the box and sending it directly to .accdb file.

I tried making .accdb filed value as [date/time] or [text] with same results.

Can somebody help me?

4

1 回答 1

0

apparently needed to put this outside the string value #" & DateTimePickerIFT.Value.ToShortDateString & "#

于 2012-10-24T21:01:09.950 回答