Hello,
Our Calendar Appointment documents have Start/End fields similar to what’s listed at the end of the message.
When I attempt to create an appointment programatically via COM, I’m having a hard time creating a Time/Date data type with just the date or just the time.
The code below creates Time/Date values, but when I look at the properties of the document after it’s saved, the StartDate field has “12:00 AM EST” in it and the StartTime field has “11/30/1999” in it.
l_tDateTimeStart = g_oLNsession.CreateDateTime(“01/19/2010 06:00 PM”)
l_tTimeStart = g_oLNsession.CreateDateTime(“06:00 PM”)
l_tDateStart = g_oLNsession.CreateDateTime(“01/19/2010”)
Doc.ReplaceItemValue(“StartDate”, l_tDateStart.LSLocalTime)
Doc.ReplaceItemValue(“STARTDATETIME”, l_tDateTimeStart.LSLocalTime)
Doc.ReplaceItemValue(“StartTime”, l_tTimeStart.LSLocalTime)
In a v6.5.x template, I could get away with using the “DateOnly” and “TimeOnly” text properties of the datetime object, but with a v8.0.x template I get the following error and the document will not open.
IBM Lotus Notes
Field: ‘tmpStartDate1’: Incorrect data type for operator or @Function: Text expected
OK
Can anyone help?
Thanks.
Bill
=========================
Field Name: StartDate
Data Type: Time/Date
Data Length: 8 bytes
Seq Num: 1
Dup Item ID: 0
Field Flags: SUMMARY
01/19/2010
=========================
Field Name: STARTDATETIME
Data Type: Time/Date
Data Length: 8 bytes
Seq Num: 1
Dup Item ID: 0
Field Flags: SUMMARY
01/19/2010 04:30:00 PM EST
=========================
Field Name: StartTime
Data Type: Time/Date
Data Length: 8 bytes
Seq Num: 1
Dup Item ID: 0
Field Flags: SUMMARY
04:30:00 PM
=========================