Date syntax problem?

i have this little code snippet that is not working properly.

If the doc.created <= 21/05/2007 then d = workspace.DialogBox( “OldDetails”, True, True, False, True, False, False, “Old Booking Details”)

But its just ignoring it… and processing all recodes regardless of creation date.

Is my syntax correct ??

Msgbox doc.Created 



If doc.Status(0) = "New" Then

	d = workspace.DialogBox( "NewDetails", True, True, False, True, False, False, "New Booking Details")

Elseif  doc.Created <= "[21/05/2007]" Then

	d = workspace.DialogBox( "OldDetails", True, True, False, True, False, False, "Old Booking Details")	

Else 

	d = workspace.DialogBox( "NewDetails", True, True, False, True, False, False, "New Booking Details")

End If

Subject: Date syntax problem ??

it would be better if u used notesdatetime.look, it works fine. try.

Dim ws As New notesuiworkspace

Dim doc As notesdocument



Set doc = ws.CurrentDocument.Document



Msgbox doc.Created



Dim dt1 As NotesDateTime

Dim dt2 As notesdatetime



Set dt1 = New notesdatetime(doc.Created)

Set dt2 = New notesdatetime("[21/05/2007]")



If dt1.DateOnly <= dt2.DateOnly Then

	Msgbox "1"

Else

	Msgbox "2"

End If

Subject: RE: Date syntax problem ??

Many Thanks…

all on now…