Member Avatar
hueikar

Hi guys,
I want to export the record according date range with visual basic.
And the date range will be using 2 date time picker to choose.
Can anyone give an idea how to do it?
Thank you.

you need to select start and end dates from the control
format it as per database format before using the values.
Use BETWEEN operator in database side for date range.

Member Avatar
hueikar

Then what function can i put like if i just finish choose the date from date time picker then it will direct show data according date range choose by me?

Like combobox have selected index change.

Thank you.

Member Avatar
hueikar

Thank you. I had solve it.

Dim date1, date2 As String
        date1 = String.Format("{0:yyyy/MM/dd}", datetimepicker1.Value)
        date2 = String.Format("{0:yyyy/MM/dd}", datetimepicker2.Value)