DateRange is working on Local host not on server

HiMy date range is working on local host but when i am trying to run on web it gives page not found.Some time its also give TypeMismatch.I am calling agent.

Please help.

My code is

Dim Session As New notessession

Dim Database As notesdatabase

Dim view As NotesView

Dim doc As notesdocument

Dim doc1 As notesdocument 

Dim coll As NotesDocumentCollection 

Dim aa As String 

Dim bb As String

Set doc=Session.DocumentContext

Dim startdate As New NotesDateTime(doc.moddate(0))

Dim enddate As New NotesDateTime(doc.moddate_1(0))

Set Database=Session.CurrentDatabase

Set view=database.GetView("dateRangeTest")

aa=doc.UserName(0)

bb=doc.ExtCompany1(0)

Set coll = Database.FTSearch({FIELD Name = "} + aa, 0)

Msgbox coll.Count

Call coll.FTSearch({FIELD ExtCompany1 = "} + bb, 0)

Set doc1 = view.GetFirstDocument

While Not doc1 Is Nothing

	If (Cdat(doc1.OpenDate(0)) >= Cdat(startdate.dateonly)) And (Cdat(doc1.OpenDate(0)) <= Cdat(enddate.DateOnly ))Then

Print " " & doc1.TicketNum(0) “”

	Print "  <td>" &doc1.OpenDate(0) "</td>"

	Print  "  <td>" & doc1.Status(0) "</td>"

	Print   " <td>" & doc1.ExtCompany1(0) " </td>"

	Print  " <td>"& doc1.Problem(0) "</td>"

Wend

Thanks.

Please help

Rajeev Thakur

Subject: DateRange is working on Local host not on server

If your server is running on Windows OS as a service, unless you have set it up correctly it may be running as US date format, whereas the client may be set up for UK date format.

If the server console shows mm/dd/yyyy and you are expecting dd/mm/yyyy this could be the reason.

Check the support database for articles on server date-time on windows OS. that should tell you how to resolve if this is the case.

Subject: RE: DateRange is working on Local host not on server

Hi ,i checked with server date and time.There is no issue for server date and time format.

Do you think this issue is related with some authentication on server for running the agent on web…

Subject: RE: DateRange is working on Local host not on server

Exactly HOW are you calling the agent from the web application? You will only get the current backend NotesDocument in the same way as it would work in the notes client using session.documentContext if you are calling the agent from the web browser using @command([ToolsRunMacro];“(my Agent)”). If you are calling via URL or onSubmit then the document you get is an in-memory document containing all the CGI variables. Check designer help for full information.

How have you set up the agent? Is it:

shared

Set to run on selected documents

set to run as web user