I have 2 datetimepickers on my form, and I use them to pass parameters to my sql queries for reporting purposes. You would use them to pick a date range and display clock in times for employees. Anyway, I need an option so users can see information from a single day(24 hour timespan) My first Idea was to let the user change the date on the first datetimepicker then changing the time to 12:00 AM then the second datetimepicker to 11:59 PM. I want to be able to do this programmatically, but I couldnt figure out how to change the time. I feel so stupid please give me some advice.

Try it,

DateTimePicker1.Value = DateTimePicker1.Value.AddMinutes(1)
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.