|
Morning or Afternoon
Find out whether it is morning or afternoon and
display a graphic , you could redirect to other pages or have
different backgrounds.
Code :
<%
Dim dtmHour
'store the hour in dtmHour
dtmHour = Hour(Now)
'display the am gif if before 12 O clock(noon)
if dtmHour < 12 Then
Response.Write "<img src='am.gif'>"
'display the pm gif if after 12 O clock (noon)
Else
Response.Write "<img src='pm.gif'>"
End If
%>
Graphics :

|