getItemValueDateTime (NotesXspDocument - JavaScript™)
Gets the value of an item as a Notes® date/time.
Syntax
getItemValueDateTime(name:string) : NotesDateTime (JavaScript)
Parameter | Description |
---|---|
name |
The name of the item. |
Return value | Description |
---|---|
NotesDateTime |
The item value. |
Usage
If multiple items have the same name, this method returns the value of the first item.If the item has multiple values, this method returns the first value.
If the item does not exist, this method returns null.
If the item is text or a number, this method returns null.
Examples
This data binding for a computed field returns the value of the datetime item in the document associated with the current XPage.var d = document1.getItemValueDateTime("datetime");
if(d == null) {
return "datetime is empty or doesn't exist."
} else {
return d.getLocalTime()
}