Sep 1, 2002 #1 amclean Technical User Feb 20, 2002 1 CA Is there a way to have a dtpicker return only the time as its value? Thanks in advance...
Sep 1, 2002 #2 Jon4747 Programmer Aug 22, 2001 234 CA Hi, If you want the dtp to display only time, set the format property to time. If you want the time selected to appear somewhere else such as a textbox you can use the Format statement e.g. Text1.Text = Format(DTPicker1.Value, "long time" Jon Upvote 0 Downvote
Hi, If you want the dtp to display only time, set the format property to time. If you want the time selected to appear somewhere else such as a textbox you can use the Format statement e.g. Text1.Text = Format(DTPicker1.Value, "long time" Jon
Sep 3, 2002 #3 zemp Programmer Jan 27, 2002 3,301 CA If all you want is the current time why not use the Time function. It works just like the Date function. ' Returns current system time in the system-defined long time format. MyStr = Format(Time, "Long Time" ' Returns current system date in the system-defined long date format. MyStr = Format(Date, "Long Date" Thanks and Good Luck! zemp Upvote 0 Downvote
If all you want is the current time why not use the Time function. It works just like the Date function. ' Returns current system time in the system-defined long time format. MyStr = Format(Time, "Long Time" ' Returns current system date in the system-defined long date format. MyStr = Format(Date, "Long Date" Thanks and Good Luck! zemp