Time Sensitive Greeting

Good Morning, Good Afternoon, Good Evening
Here is a simple function that will return a string on your page displaying an appropriate greeting.

Good Afternoon, the current time is 3:32:18 PM
This is SERVER time NOT necessarily client time.
<%
 Function Greeting()
     If Hour(Now) < 12 Then
         Greeting = "Good Morning"
     ElseIf Hour(Now) < 18 Then
         Greeting = "Good Afternoon"
     Else
         Greeting = "Good Evening"
     End If
 End Function
 %>
 
<HTML>
 <HEAD>
 <TITLE>Good Morning, Good Afternoon, Good Evening</TITLE>
 </HEAD>
 <BODY>
 Good Morning, Good Afternoon, Good Evening<br>
 
Here is a simple function that will return a string on your page displaying an appropriate greeting. <br>
 
<font face="Arial" Size="2" Color=#993300><%= Greeting() %>, the current time is <%= Time() %> </font>
 
</BODY>
 </HTML>


time asp greeting


Back To Top
© 1998 - 2017 psacake.com | My3C's

Version 7.2 | Advertise on this site