Using a Date Parameter in a URL for an Agent & Get Past Weekday (Monday)

Mindwatering Incorporated

Author: Tripp W Black

Created: 09/16/2003 at 11:00 PM

 

Category:
Notes Developer Tips
LotusScript

Get the past specific day's date for each week.

The following 2 files contain sample routines for parsing/manipulating date information.
The first gets a date from a url Query_String, adjusts it back and uses those dates at document collection keys.
The second gets this past x (e.g. Monday).

URL Date Parameter and AllEntriesByKey.txtdate_count_back.txt

Note:
If the year is between 100 and 9999, we can get the year and reformat strings for yyyy/mm/dd, as well.

Dim docDT as Variant ' doc.Created
Dim docYr as Integer ' year of docDT (100-9999)
Dim docMo as Integer ' month of docDT (1 through 12)
Dim docDy as Integer ' day of month of docDT (1-31)
Dim dtStr as String ' yyyy/mm/dd
...
docDT = doc.Created
If Not (docDT is Nothing) Then
docYr = Year(docDT)
docMo = Month(docDT)
docDy = Day(docDT)
End If

dtStr = Cstr(docYr) & "/" & Right$("0" & Cstr(docMo), 2) & "/" & Right$("0" & Cstr(docDy), 2)
Print "dtStr: " & dtStr



previous page

×