tohrmin00(X;Y)
Convert a string, date+time, or time to a time value in the form HHMM*100. (Available as of version 18.04)
Syntax
tohrmin00(X;Y)
Input
Argument | Type | Description |
---|---|---|
X |
any | A scalar value or the name of a column
containing date-related values Valid values can be of the form:
|
Y |
text | An optional argument indicating how to display the results Valid values are:
|
tohrmin(X;Y)
can take a variety of input values. It allows a date+time
value, discarding the date portion. It is the equivalent of
10000*tohour()+100*tomin()
.
Return Value
Returns the integer value corresponding to the hour and minute portions of the time-related value given as input, *100.
For more information about date formats, see Dates and time.
If the input values are not in one of the supported formats listed above, the function returns an erroneous or illogical output.
Example
The following example converts strings containing times to an integer containing the hour
and minute portions only, and then multiplying it by 100. The Y
argument is
'rollover'
, so that it accepts any positive values and rolls over the
time that is 24:00:00 and above.
<table cols="time_text">
"24:00:00"
"36:13:14"
"11:45:10"
"14:56:03"
</table>
<willbe name="hour_minute" value="tohrmin00(time_text; 'rollover')" format="type:nocommas"/>