English 中文(简体)
Subtracting date fields in xpages
原标题:

Can anyone help me to come up with a formula to: (1) subtract dates in xpages [not in lotus client] I am a beginner in xpages with no experience in xpages javascript or xpages expression language.

(2) If possible can anyone also help me compute for the Business Days in xpages because there is no @BusinessDays function in xpages.

Hope someone could help me. Many thanks in advance!

问题回答

(1) subtract dates in xpages [not in lotus client] I am a beginner in xpages with no experience in xpages javascript or xpages expression language.

I found this on an IBM wiki site, tested and it works:

timeDifference

This computed field returns the number of days since the current document was created.

var doc:NotesDocument = currentDocument.getDocument();
var created:NotesDateTime = doc.getCreated();
var now:NotesDateTime = session.createDateTime("Today 12");
now.setNow();
var days:int = now.timeDifferenceDouble(created) / 86400; // 86400 seconds in a day
return "This document was created "  + Math.floor(days) + " days ago."

1) http://markalexanderbain.suite101.com/have-a-date-with-javascript-a85811

2) You ll need a database or some kind of access to a calendar so you can skip public holidays in addition to weekends.





相关问题
Where are the javadocs for Lotus Notes.jar?

I need to use Lotus Notes/Domino as a data source from a Java application. The documentation at IBM says that the Notes.jar contains everything I will need, but where are the javadocs?

Is Interop.Domino dll thread safe?

I am using Interop.Domino dll version 1.2 in c# application, and using multithreading to access multiple NSF file at same time by creating new session for each thread created (Max 5 threads at a time)....

C#和Lotus Notes附录一

我正在使用C#,并需要附上一张空白(shortcut/link)档案和电子邮件给一个彩票账户。 问题是一对一幅通用形象的不实之词,没有像......那样显示双fold。

How to maintain Lotus Notes Version ? C#

I made one product which is retrieving attachment from mails and saving it on particular folder. But problem i am facing is it is not working in 8.0 version. I did development on Lotus Notes 8.5 ...

How to Edit NSF file using c#?

I want to programaticaly change some values to NSF item and then want to save it.(i.e to edit NSF File and then save the editions) for example: I want to set Sender name of all mails to "preeti@abc....

热门标签