DateTime Picker questions

tpfkanep
09-05-2003, 12:49 AM
Hi,

I have placed the DTP on a form with the Format set to dtpTime.

I enter a time in the control, but a
MsgBox dtpJobTime displays : 2003/05/05 16:16:16

Why?

If I want to save this value in a table, will the extra date also be saved?
I only need the time.
Is there another control to use to get only the time?

Thanx.

Flyguy
09-05-2003, 01:27 AM
You should format the .Value property to a time string only

Dim sTime As String

sTime = Format(dtpJobTime.Value, "hh:nn:ss")

SpaceFrog
09-05-2003, 01:28 AM
Check the format instruction

Msgbox format(dtpJobTime;hh:mm)

Edited(Faster than me Flyguy, but got your fingers mixed up as well :chuckle:
hh:mm:ss)

tpfkanep
09-05-2003, 01:35 AM
Thanks.

Chris J Locke
09-05-2003, 06:50 AM
Edited(Faster than me Flyguy, but got your fingers mixed up as well - hh:mm:ss)Not quite - 'n' denotes minutes, although the format function also recognises 'm' as minutes, if used after h's... ;)

SpaceFrog
09-05-2003, 06:56 AM
I learn every day !
Thanks, I had never seen that notation nn for minutes anywhere ...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum