Skip to main content
FORUM PLAN UPDATE: Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 8 Forum

Notes/Domino 8 Forum

Sign in to participate 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


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

Can anyone help?


Field Name: StartDate
Data Type: Time/Date
Data Length: 8 bytes
Seq Num: 1
Dup Item ID: 0
Field Flags: SUMMARY

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 Bill Fields on 01/19/2010

Status: Open

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


Search this forum

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite