dear all,I need a LS to get number of working days between today and a past date…i need to exclude holidays as well i have holidays in a view…here is my code to get the number of hours between the two days
Dim se As New NotesSession
'Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim doc, mDoc As NotesDocument
Dim mailDoc As NotesDocument
'Dim cdoc As NotesUIDocument
Dim cdcl,cdclM As NotesDocumentCollection
Dim rtitem As notesrichtextitem
Dim sFormula As String
Dim iNum As Integer
Dim iLoop As Integer
Dim idate As Variant
Dim HourCount As Variant
Dim dt As New NotesDateTime("Today")
Dim sToday
Set db=se.CurrentDatabase
'Set cdoc=ws.CurrentDocument
sToday =Cstr(Today)
sFormula = "Form = ""LAS_AdminHolidayForm_Frm"""
'sFormula = sFormula & " & LAS_AdminHoliday = @TextToTime(""" & sToday & """)"
Set cdclM =db.Search (sFormula, Nothing, 0)
If cdclM.Count = 0 Then
sFormula = "Form = ""LAS_MainLone_Frm"""
sFormula = sFormula & " & LAS_MainLone_Status != ""Terminated"""
sFormula = sFormula & " & LAS_MainLone_Status != ""Facility Declined"""
sFormula = sFormula & " & LAS_MainLone_Status != ""Noted"""
sFormula = sFormula & " & DeleteIndi = """""
Set cdcl =db.Search (sFormula, Nothing, 0)
For iLoop=1 To cdcl.count
Set doc=cdcl.GetNthDocument (iLoop)
If doc.EscalateTime(0)<>"" Then
idate=Now()-doc.EscalateTime(0)
HourCount=idate*24
doc.EscHours=Cstr(HourCount)
End If
Call doc.save(False,False)
Next
End If