## This function can accept dates as a character string:
combine.date.and.time(date="2011-05-03", time="16:15:30")
## Or, the dates can be in R's Date format.
combine.date.and.time(date=as.Date("2011-05-03"), time="16:15:30")
## The time can also be given as a list:
combine.date.and.time(date="2011-05-03", time=list(hrs=16, mins=15, secs=30))
Run the code above in your browser using DataLab