dtpicker control and format function

i have 2 questions
1- in the DTPicker control i set format to custom, and custom format to hh:mm:ss but when run the program all things is ok except one thing i want the hours to be from 00 to 23 not from 00 to 12 how can i do that?

2- i want to use the format function in order two represent any number in 4 characters only and leave blank (not 0) in the case of the number is less than 4 characters
e.g.

"1234" => "1234"
"12  " => "  45"  (not "0045")
aftAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Z_BeeblebroxConnect With a Mentor Commented:
Hi,

for the number thing:

Space(4 - Len(CStr(intNumber))) & CStr(intNumber)

Zaphod.
0
 
JoshyyCommented:
instead of hh:mm:ss make the format HH:mm:ss
0
 
JoshyyCommented:
what do u mean in your second question?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
aftAuthor Commented:
i want to display any number in 4 characters if the number is less than 4 charcters add a space or more  before it
0
 
andysalihCommented:

Private Sub Form_Load()
    Label1.Caption = Format(Now, "Long Time") & vbCrLf & Format(Now, "Medium Time") & vbCrLf & Format(Now, "Short Time") & vbCrLf & Format(Now, "General Date") & vbCrLf & Format(Now, "Long Date") & vbCrLf & Format(Now, "Medium Date") & vbCrLf & Format(Now, "Short Date")
End Sub


shows different samples of time format

is that what you require

regards
Andy
0
 
andysalihCommented:
0
All Courses

From novice to tech pro — start learning today.