Returns the value of a date-time item in a document.
Syntax
getItemValueDateTimeArray(name:string) : java.util.Vector
Parameter |
Description |
String name |
The name of a date-time item. |
Return value |
Description |
java.util.Vector |
The value or values contained in the item. Each
element in the vector corresponds to a value in the item and is of
type NotesDateTime or NotesDateRange. If the item
contains a single value, the vector has one element. |
Usage
You can determine the class of each element
with typeof
. The class name ends with either DateTime
or DateRange
.
Examples
This button gets the value of a date-time
item in the current document.
try {
var itemname:string = "times";
var doc:NotesDocument = currentDocument.getDocument();
if (doc.hasItem(itemname)) {
var itemvalue:java.util.Vector = doc.getItemValueDateTimeArray(itemname);
var iterator = itemvalue.iterator();
while (iterator.hasNext()) {
var itemvalue1 = iterator.next();
if ((typeof(itemvalue1)).endsWith("DateTime")) {
requestScope.status += "\nTime: " + itemvalue1.getLocalTime();
} else if ((typeof(itemvalue1)).endsWith("DateRange")) {
requestScope.status += "\nStart: " + itemvalue1.getStartDateTime().getLocalTime();
requestScope.status += "\nEnd: " + itemvalue1.getEndDateTime().getLocalTime();
}
}
}
} catch(e) {
requestScope.status += "\n" + e.toString()
}