PDA

View Full Version : Solved: Date & Time Control



spartacus132
09-21-2006, 07:44 AM
Hello,
I need to perform a query based on the date and time selected on a form. For the query to work I need the time to be in 24hr format and each component of time should be 2 digits long. Examples of format that I need:
15:40:44
00:00:00
01:00:43

I tried to use custom format and specified the format that I require; on the form the format shows up correctly, but when I try to obtain the value as a string the format is not what I need. :dunno

I am attaching a spreadsheet to illustrate my problem.

Thanks in advance for any help that I receive.

Erdin? E. Ka
09-21-2006, 08:12 AM
Hi
Your problem about Cdate ( Type Conversion Functions ) and Format Function.

You should change rows below; and your problem will be over. :hi:

MsgBox "Start Time: " & Format(CDate(DTPickerStartTimeValue), "hh:mm:ss")

MsgBox "End Time: " & Format(CDate(DTPickerEndTimeValue), "hh:mm:ss")

spartacus132
09-21-2006, 10:04 AM
:)
thanks!

Erdin? E. Ka
09-21-2006, 12:02 PM
Don't mention it.