如何取得服务器的日期时间?(C/S)

KevinLiou 2003-07-01 09:29:12
如何从客户端用LS或者公式取得服务器的日期时间呢?
我的Domino版本为5.02C
...全文
41 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
KevinLiou 2003-07-01
  • 打赏
  • 举报
回复
好像没有db.deletedocument()
而且没有这句,好像也没有新生成文件。
sacrefies 2003-07-01
  • 打赏
  • 举报
回复
可以考虑使用“文档创建时间”来模拟服务器时间啊~
dim db as new notesdatabase (session.currentdatatbase)
dim doc as notesdocument
dim docid as string
dim servertime as string

set doc = db.createdocument
servertime = cstr(doc.created)
docid = doc.unversalid
db.deletedocument(docid)

servertime就是你要的时间
noregretslf 2003-07-01
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=4221
KevinLiou 2003-07-01
  • 打赏
  • 举报
回复
谢谢死去活来。不过我要取得的是当前的Server时间。
比如说现在有一个文件需要签核,为了保证签核日期显示的正确(也就是防止用户以修改客户端的日期时间以变更签核日期),需要抓取Server的日期时间。
xiajiatou 2003-07-01
  • 打赏
  • 举报
回复
脚本:doc.Created.示例:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim createDate As Variant
Set db = session.CurrentDatabase
Set view = db.GetView( "Main View" )
Set doc = view.GetLastDocument
createDate = doc.Created
Messagebox( createDate )
公式:
@Now,@Today可以取当前时间

535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧