Member Avatar for 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.

Recommended Answers

All 3 Replies

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 for 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 for 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)
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.