You are here

Displaying a message according to the time of a day and weekday.

This program displays a message according to the time of the day and weekday.
greeting.asp


  1. <%@ Language=VBScript %>
  2. <%
  3. If Time >= #12:00:00 AM# and Time < #12:00:00 PM# then
  4. greeting = "Good Morning"
  5. else
  6. greeting = "Hello!"
  7. End if
  8. %>
  9. <script runat=server language=vbscript>
  10. Sub SayDate()
  11. Response.Write("<h1>Today's date is "& Date &"</h1>")
  12. End sub
  13. </script>
  14. <HTML>
  15. <HEAD>
  16. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  17. </HEAD>
  18. <BODY>
  19.  
  20. <P><% =greeting %>&nbsp;</P>
  21. <% Call SayDate()
  22. Response.Write("<hr>")
  23. %>