programming-examples/asp/More_Code_Snippets/Datediff example.asp

11 lines
249 B
Plaintext
Raw Permalink Normal View History

2019-11-18 14:25:58 +01:00
<%
Dim date1 , date2 , strDateDiff
date1 = Now()
date2 = "18/10/1974"
strDateDiff = DateDiff("yyyy" , date2 , date1 )
If strDateDiff < 16 Then
Response.Write "Sorry you are under age"
Else
Response.Write "You may enter"
End If
%>