Date and Time

K

Karim

How do I emulate Date and Time function when I custom design the
Appointment Form. I would like to create the Date and Time funtion so
I can modify the time to only accept 3 time slots values using a drop
down.

E.g. Start Date, dropdown graphical view (I am currently using
DTpicker activeX)
and
Start Time, dropdown text 9:00AM,10:00AM,11:00AM with 45 mins interval

I would like the End Date and time (read only) to reflect that so if I
put a date as 1/1/2003 and time as 9:00AM, the end date should read
1/1/2003 9:45AM

Thanks.
Karim
 
K

Ken Slovak - [MVP - Outlook]

I'm not sure I understand but this should work:

Dim strDate As String
Dim strTime As String
Dim StrDateTime As String
Dim datDateTime As Date

strDate = CStr(DTPicker1.Value) '1/1/2003
strTime = CStr(DTPicker2.Value) '9:00AM
strDateTime = "#" & strDate & " " & strTime & "#"
datDateTime = CDate(strDateTime)

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top