WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE
The TimeSerial function returns the time for a specific hour, minute,
and second. Returns a Variant of subtype Date containing the
time for a specific hour, minute, and second. To specify a time,
such as 11:59:59, the range of numbers for each TimeSerial argument
should be in the accepted range for the unit; that is, 0-23 for
hours and 0-59 for minutes and seconds. However, you can also specify
relative times for each argument using any numeric expression that
represents some number of hours, minutes, or seconds before or after
a certain time. When any argument exceeds the accepted range for
that argument, it increments to the next larger unit as appropriate.
For example, if you specify 75 minutes, it is evaluated as
one hour and 15 minutes. However, if any single argument is outside
the range -32,768 to 32,767, or if the time specified by the three
arguments, either directly or by expression, causes the date to
fall outside the acceptable range of dates, an error occurs.
The following example uses expressions instead of absolute time
numbers. The TimeSerial function returns a time for 15 minutes
before (-15) six hours before noon (12 - 6), or 5:45:00 A.M.
The Syntax of the TimeSerial function is :-
TimeSerial(hour,minute,second) |
Its Description is :-
Parameter |
Description |
hour |
Required. A number between 0 and 23, or a numeric
expression. |
minute |
Required. Any numeric expression. |
second |
Required. Any numeric expression. |
Example#1 :-
Code :-
document.write(TimeSerial(23,2,3) & "<br />")
document.write(TimeSerial(0,9,11) & "<br />")
document.write(TimeSerial(14+2,9-2,1-1))
Output :-
11:02:03 PM
12:09:11 AM
4:07:00 PM |
Example#2 :-
Code :-
document.write(TimeSerial(12-6, -15,0) & "<br />")
Output :-
5:45:00 AM. |
Example#3 :-
Code :-
document.write(TimeSerial(18, 35, 27) & "<br />")
Output :-
6:35:27 PM |
Example#4 :-
Code :-
document.write(TimeSerial(12, 11, 10) & "<br />")
Output :-
12:11:10 PM |
Example#5 :-
Code :-
document.write(TimeSerial("12", "11", "10")
& "<br />")
Output :-
12:11:10 PM |
|