Comparing a date/time field with an adjustday value

Hi all,

I am trying to adjust a prompted date value into two separate days. I want the new values to be recorded as 2 days before and after the date entered in to the prompt.

The two dates then need to be compared to another date on a different form.

I will need something like:

If (adjusted date 1)<= (date on form1) And (Adjusted Date 2) >= (date on form1) Then

Do something

Any help with this would be greatly appreciated. Thanks!

I have the following code. I only had the messagebox part to see if it was working correctly.

DateErrorMove = ws.Prompt(PROMPT_OKCANCELEDIT, "Date of Error Move", "Please enter the date of error for car " & n & " for invoice " & InvoiceNumber & ". In the format mm/dd/yyyy.", "", "")

	

	Dim dem As String

	dem = Cdat(DateErrorMove)

	Dim bndt As New notesdatetime("dem")

	Dim endt As New NotesDateTime("dem")

	Call bndt.AdjustDay(-2) 

	Call endt.AdjustDay(2)

	

	Messagebox(bndt)

	Messagebox(endt)

Subject: comparing a date/time field with an adjustday value

I found a really good link to how to solve this if anybody would like it for future reference.

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/86743f74e5683544852571f0004f2ca1?OpenDocument