运算符或Lotusfunction上预期的@function时间/日期的数据类型不正确? [英] Incorrect data type for operator or @function time/date expected on lotusscript?

查看:139
本文介绍了运算符或Lotusfunction上预期的@function时间/日期的数据类型不正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在LotusScript中:我用过:

In lotusScript: I've used:

doc.DocDate = Format(document.get("DatePublished"),"mm/dd/yyyy") 'Rem return 08/22/2017

在公式中:我曾经用来获取年份:

In formula: I've used for to get year:

@Year(DocDate)

但是,当我运行程序时,出现错误:操作员或@function时间/日期预期的数据类型不正确".如何解决?

But when i run the program i get the error : "incorrect data type for operator or @function time/date expected". How to fix it?

推荐答案

获取日期值

document.DatePublished(0)

document.GetItemValue("DatePublished")(0)

然后应该正确计算您的字段DocDate.

Then your field DocDate should be calculated properly.

@Year()需要NotesDateTime值. DocDate是一个字符串值.您可以将公式更改为

@Year() expects a NotesDateTime value. DocDate is a String value though. You can change your formula to

@Year(@ToTime(DocDate))

,并且如果您将语言设置设置为美国日期格式,它将起作用.

and it will work if your language settings are set to US date format.

这篇关于运算符或Lotusfunction上预期的@function时间/日期的数据类型不正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆