Member Avatar

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

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.

Jump to Post

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

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

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