i am in need to retrive content from acess with date/time datatype as constraint and its checking value is from datetimepicker of vb.net.

i have set both format of date as short format but getting datatype mismatch error in expression.

my coding:

  dim bdate as date
  bdate = datetimepicker_oneday.Value.Date
  sSQL = " select * from register_details where hall_name='" & ucombobox_hallname.Text & "' and process_date='" & bdate & "' "

process_date is an access field of date/time and short date format

Re: date data type in acess and vb.net 80 80

The problem with the date object is that it defaults to 12:00:00 for the time portion of the date.

Try using:

bdate.ToShortDateString()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.