0

我的数据格式有问题。当我在 Lotus 数据库(在 Lotus 客户端)中创建文档时,没有时间插入日期

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

'2011-01-26`

当我从 C# 创建/更改它时,它包含时间:

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

2010-12-15 00:00:00 CET

用于更改文档的命令

doc.ReplaceItemValue("data_inicio", Convert.ToDateTime( "2010-12-15"));

先感谢您

4

3 回答 3

1

使用日期时间格式

于 2011-01-26T14:41:37.667 回答
0

如果您使用 notesDateTime 对象,而不是使用 ReplaceItemValue 和 Convert,您可以使用仅日期组件创建日期时间字段。例如:

...
Dim dt As notesDateTime
Set dt = New NotesDateTime ("1/1/2011")
set doc.testDate = dt
call doc.save (true, false)
...
于 2011-01-31T18:20:46.313 回答
0

问题在于您的 Lotus Notes 日期字段。您需要检查属性“显示时间”。

在表单上转到您的日期字段,然后单击属性 在第二个选项卡上,您将看到两个部分: 显示 --> 显示日期和显示时间 确保这两个都被选中。

于 2011-01-26T14:42:27.797 回答