TimeValue: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(Created page with "TIMEVALUE(''time'') '''Description''' TIMEVALUE returns a time from, ''time'', which is usually a string, but any expression that can represent a time ranging from 0:00:00 (...")
 
No edit summary
Line 1: Line 1:
TIMEVALUE(''time'')
TimeValue(''time'')


'''Description'''
== Description ==


TIMEVALUE returns a time from, ''time'', which is usually a string, but any expression that can represent a time ranging from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 PM), can be used.
TimeValue returns a time from, ''time'', which is usually a string, but any expression that can represent a time ranging from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 PM), can be used.


If ''time'' is a string that consists of numbers separated by time separators, it recognizes hour, minute, and second in the order specified by the system short time format, using zero for unspecified components. TIMEVALUE recognizes time in both 12-hour and 24-hour format.
If ''time'' is a string that consists of numbers separated by time separators, it recognizes hour, minute, and second in the order specified by the system short time format, using zero for unspecified components. TimeValue recognizes time in both 12-hour and 24-hour format.


Time separators are characters that separate hour, minute and second when a time is formatted as a string, they are determined by your system settings.
Time separators are characters that separate hour, minute and second when a time is formatted as a string, they are determined by your system settings.


'''Example'''
== Example ==


<pre>
<pre>
REM TIMEVALUE Example
Rem TimeValue Example
'TIMEVALUE returns a time
'TimeValue returns a time
DIM FiveThirty, Noon
Dim FiveThirty, Noon
FiveThirty = TIMEVALUE("5:30 PM")
FiveThirty = TimeValue("5:30 PM")
Noon = TIMEVALUE("12:00")
Noon = TimeValue("12:00")
PRINT "Half past five:", FiveThirty
Print "Half past five:", FiveThirty
PRINT "Noon:", Noon
Print "Noon:", Noon
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
Line 29: Line 29:
</pre>
</pre>


'''Related Items'''
== Related Items ==


[[datevalue|DATEVALUE]]
[[datevalue|DATEVALUE]]
[[Category:Language Reference]]

Revision as of 03:58, 17 August 2012

TimeValue(time)

Description

TimeValue returns a time from, time, which is usually a string, but any expression that can represent a time ranging from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 PM), can be used.

If time is a string that consists of numbers separated by time separators, it recognizes hour, minute, and second in the order specified by the system short time format, using zero for unspecified components. TimeValue recognizes time in both 12-hour and 24-hour format.

Time separators are characters that separate hour, minute and second when a time is formatted as a string, they are determined by your system settings.

Example

Rem TimeValue Example
'TimeValue returns a time
Dim FiveThirty, Noon
FiveThirty = TimeValue("5:30 PM")
Noon = TimeValue("12:00")
Print "Half past five:", FiveThirty
Print "Noon:", Noon

Output

Half past five:      05:30:00 PM
Noon:  12:00:00 PM
(sample time output is system dependant)

Related Items

DATEVALUE