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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.