Sammenlign 2 datoer
Jeg vil gerne sammenligne 2 datoer for at finde ud af om A er ældre end B.Prøvede med dette
Dim Date1
Dim Date2
Date1 = 10-10-2001
Date2 = 11-10-2001
Public Function compareDates(Date1 As Date, Date2 As Date) As _
Integer
Select Case Date1
Case Is > Date2
compareDates = 1
Case Is < Date2
compareDates = 2
Case Else
compareDates = 0
End Select
End Function
Response.write compareDates
Men Morzilla siger:
Microsoft VBScript compilation error '800a03ee'
Expected ')'
test.asp, line 176
Public Function compareDates(Date1 As Date, Date2 As Date) As _
-----------------------------------^