Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining date and times

Status
Not open for further replies.

croydon

Programmer
Apr 30, 2002
253
EU
What is the best way to set the date and time in a date field? I am writing a small program that creates appointment slots for certain times within certain dates. I know the dates and start times but can't think of a way of combining these without using a string, as follows:

dteDate = #1/6/2005#
dteTime = "08:00"
strDate = CStr(dteDate) & " " & CStr(dteTime)
dteNewDate = (strDate)

I'm sure there must be a better way. Any suggestions appreciated. Thanks.
 
Hi try this
dteNewDate = dteDate + dteTime
Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top