gpt4 book ai didi

java - 如何在Lotus中使用java从字段中获取日期时间值

转载 作者:行者123 更新时间:2023-11-30 02:44:46 27 4
gpt4 key购买 nike

我使用 IBM Notes 和 IBM Domino Designer。我有一个带有日期/时间字段的表单。该字段称为“Orderdatum”,来自 java 代理,我最终通过这样做来调用该字段:

orderDocument.getItemValueDateTimeArray("Orderdatum")

如果它被填充,那么它就可以工作,但如果它是空的,那么我得到这个:

NotesException: Item value is not a date type
at lotus.domino.local.Document.NgetItemValueDateTimeArray(Native Method)
at lotus.domino.local.Document.getItemValueDateTimeArray(Unknown Source)
at JavaAgent.postOrder(Unknown Source)
at JavaAgent.NotesMain(Unknown Source)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(Unknown Source)

即使我做了如下检查:

if(orderDocument.getItemValueDateTimeArray("Orderdatum") != null){
if(!orderDocument.getItemValueDateTimeArray("Orderdatum").equals(null)){

我的控制台中仍然出现错误,如何避免这种情况。

最佳答案

使用这个:

if(orderDocument.getItemValue("Orderdatum") != null){

关于java - 如何在Lotus中使用java从字段中获取日期时间值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40528515/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com