IsTimeOfDay ( _var )
Rate this function: Average rating: 0.0 (0 votes) Discuss this Custom Function
Rewolfer, -
http://rewolfer.de
return number of seconds since midnight if valid or nothing if invalid
Sample Input:
IsTimeOfDay ( "23:1:13" )
IsTimeOfDay ( "11:01:13 PM") |
|
Sample Output:
|
Description:
/*=================================================
FORM: IsTimeOfDay ( _var )
PURPOSE: return number of seconds since midnight if valid or NOTHING if invalid
PARAMETER: _var format: unknown value:variable
RESULT: number of seconds since midnight if valid or NOTHING if invalid
DEPENDENCY: -
NOTE: check with IsEmpty ( IsTimeOfDay ( _var )) instead of GetAsBoolean ( IsTimeOfDay ( _var )) since IsTimeOfDay ( 0:0 ) is valid
valid timeOfDay: 17:09:56 / 17:9:56 / 5:9 PM / 5:09 p.m. / not 170956 / not 123:34
tolerates whitespace
accepts AM/PM notation
see my other function IsTime ( _var )
EXAMPLE: IsTimeOfDay ( "23:1:13" ) => 82873
IsTimeOfDay ( "11:10:13 PM" ) => 82873
IsTimeOfDay ( "26:30" ) => ""
HISTORY: 2012-04-13 [235325] 1.00 tsw turned into IsTimeOfDay() to be valid in #VarType
2012-04-26 [005836] 1.10 tsw integrated AM/PM
DEVELOPER: tsw @ http://rewolfer.de
=================================================*/
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:There are no comments yet. Be the first to post a comment about this Custom Function! Please try to keep it brief & to the point. Anyone can post:
|
Newest Custom Functions:
| 1. |
ListToggle ( InList ; InValue ) |
| |
(Thu, May 16, 6:59pm) |
| 2. |
VatFormat ( vat ) |
| |
(Tue, May 14, 2:45am) |
| 3. |
CheckVatBE ( vat ) |
| |
(Tue, May 14, 2:32am) |
| 4. |
CheckIBAN (IBAN ) |
| |
(Tue, May 14, 2:24am) |
| 5. |
OrcidCheckDigit ( Orcid_id ; Result ; Iterations ) |
| |
(Wed, May 08, 1:44am) |
| 6. |
DateRangeBySpan ( Begin ; End ; Term) |
| |
(Mon, May 06, 6:53am) |
| 7. |
Convert_Arabic_to_Chinese( number ) |
| |
(Thu, May 02, 6:10am) |
| 8. |
NPVV ( cashFlowList, interestRate ) |
| |
(Sun, Apr 28, 1:56pm) |
 |
|