web 2.0

ASP/VBScript Hour()

ASP/VBScript Hour() Returns a whole number between 0 and 23, inclusive, representing the hour of the day.

ShotDev Focus:
- Using Asp and Hour() function.

Syntax


Hour(time)

The time argument is any expression that can represent a time. If time contains Null, Null is returned.

The following example uses the Hour function to obtain the hour from the current time:

Example

asp_hour.asp


<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Response.write Hour(Now())&"<br>"
Response.write Hour("01-Sep-2010 12:50:10")&"<br>"
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_hour.asp

Screenshot

ASP/VBScript & Hour()

.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.