Okay- I have gotten some feed back here on this issue, and I am just not getting it- I have 2 date fields (StartDate & EndDate) and two time fields (StartTime and EndTime) - I need to merge the two w/ out using “text” - and have been trying to use a formula which includes this line MergeStartTime = Cdat(Cdbl(StartDate) + Cdbl(StartTime)) - when it gets to the line of code- I get a datatype mismatch- the debugger shows them as datetime fields. Any suggestions would be greatly appreciated.
'Set current UI workspage, Uidoc & doc
Dim ws As New NotesUIWorkspace
Dim UIDoc As NotesUIDocument
Set UIDoc = ws.CurrentDocument
Set uidoc=ws.CurrentDocument
Set Doc = UIDoc.Document
'Capture Start Date from the document and set it’s value to date time
Set StartDate = Doc.GetFirstItem("StartDate")
Set StartDate = StartDate.DateTimeValue
'Capture Start Time from the document and set it's value to date time
Set StartTime =doc.GetFirstItem("StartTime")
Set StartTime=StartTime.DateTimeValue
'Capture End Date from the document and set it's value to date time
Set EndDate = Doc.getFirstItem("EndDate")
Set EndDate = EndDate.DateTimeValue
'Capture End Time from the document and set it's value to date time
Set EndTime = doc.getfirstItem("EndTime")
Set EndTime = EndTime.DateTimeValue
'Merge the StartDate & Time
MergeStartTime = Cdat(Cdbl(StartDate) + Cdbl(StartTime))
’ MergeEndTime = Cdat(Cdbl(EndDate) + Cdbl(EndTime))
’ TimeDiff = EndDateTime.TimeDifference( StartDateTime )
Msgbox TimeDiff/86400