(SOLVED) Fix Time In DTPicker....
Hi, A simple question...
I need to search something in a Access DB, for that I'm using 2 DTPickers (DT1 & DT2) to setup a date range where I can search the information.
So what I want to know is if there is a way to fix the time of the DTPickers in order to always have the DT1 @ 12:00:00 AM and DT2 @ 23:59:59
(Actually I'm using the Hour, Minute, Second properties to change the value everytime I use the DTPickers but I don't now if there is a way to fix it without changing values everytime)...
Re: Fix Time In DTPicker....
You don't even need to change time at all - you add "12:00:00 AM" to DateFrom and "11:59:59 PM" to DateTo manually:
VB Code:
strDateFrom = Format(DT1.Value, "mm/dd/yyyy") & " 12:00:00 AM"
Re: Fix Time In DTPicker....
Thanks again RhinoBull....
Re: Fix Time In DTPicker....
The default time (if you dont specify any) is 12:00:00 AM. I usually just add a day to the ToDate, so it becomes 1 second later than I want. (Since we aren't open at midnight, this doesn't cause any problems, but I suppose you could add 86,399 seconds instead of 1 day.)