Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next
Subject: Setting Appointment Date/Time fields via COM?
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Application development
Platform: ALL
Release: All
Reproducible: Always

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
=========================


Feedback number BFIS7ZUV3K created by ~Miriam Pregerochekjip on 01/19/2010

Status: Open
Comments:

Setting Appointment Date/Time field... (~Naomi Brekrosk... 19.Jan.10)
. . Are the time zone fields on the not... (~Miriam Prekipu... 20.Jan.10)
. . . . It was the Start/EndTimeZone fields... (~Naomi Brekrosk... 20.Jan.10)
. . . . . . Retrieving the db TimeZone via COM (~Naomi Brekrosk... 21.Jan.10)
. . . . . . . . Not always the most reliable field (~Miriam Prekipu... 23.Jan.10)
. . . . . . . . . . Interesting, Evaluate() is only ava... (~Naomi Brekrosk... 1.Feb.10)
. . . . . . . . . . . . Two sessions can be open at the sam... (~Naomi Brekrosk... 1.Feb.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS