Help! time calculations

I am trying to compare the time that a document is posted and if it is after 18:00:00 then I discount any time until 08:00:00 I also need to adjust for weekend arrival.

I have tried this code, but it errors for some reason, can any one help

Dim delivered As New NotesDateTime("")

Dim outward As  New NotesDateTime("")





		delivered.LocalTime = doc.posteddate(0)

		outward.LocalTime = dok.posteddate(0)	

		timet = delivered.TimeOnly

		timed = Timevalue(timet)



		timen = Timenumber(18 , 00 , 00 )

		timeno = Timevalue(timen)

		If wday = "Friday" And timed > timeno Then adj = 223200 +  timeno.timeDifference(timed) 

		If wday = "Saturday"  Then adj = 136800 +  timeno.timeDifference(timed)

		If wday = "Sunday"  Then adj = 50400 + timeno.timeDifference(timed)

		If adj = "" And timed > timeno Then adj = timeno.timeDifference(timed)			

any, all help would be appreciated.  Thanks

Subject: Help! time calculations

Thomas,

Where does it error? Have you turned the debugger on?

Also, you need to say what you have declared (ie: what is wday or dok etc etc)

Mike

Subject: RE: Help! time calculations

I am a numpty, I’ve worked it out now, so thanks for now!