For time it should look something like this.
For the date
GetLapperVar("ShortDate") it should somewhat the same.
$SplitCurrTime = SplitToArray(GetLapperVar("ShortTime"), ":");
$SplitSetTime = SplitToArray("21:00:00", ":");
$SplitCurrTime[0] = Hours
$SplitCurrTime[1] = Minutes
$SplitCurrTime[2] = Seconds
$SplitSetTime[0] = Hours
$SplitSetTime[1] = Minutes
$SplitSetTime[2] = Seconds
IF((ToNum($SplitCurrTime[0]) > ToNum($SplitSetTime[1])) && (ToNum($SplitCurrTime[1]) > ToNum($SplitSetTime[0])) &&(ToNum($SplitCurrTime[2]) > ToNum($SplitSetTime[2]))) THEN
#Your Code.
ENDIF
Thx to Racon for a much more efficient way.
<?php $SplitCurrTime = SplitToArray ( GetLapperVar ( "ShortTime" ), ":" ); $SplitSetTime = SplitToArray ( "21:00:00" , ":" ); $TimeInSecondsCurrTime = ToNum (( $SplitCurrTime [ 0 ]* 3600 ) + ( $SplitCurrTime [ 1 ]* 60 ) + ( $SplitCurrTime [ 2 ])); $TimeInSecondsSetTime = ToNum (( SplitSetTime [ 0 ]* 3600 ) + ( $SplitSetTime [ 1 ]* 60 ) + ( $SplitSetTime [ 2 ])); IF ( $TimeInSecondsCurrTime > $TimeInSecondsSetTime ) THEN #code ENDIF ?>
Last edited by Bass-Driver, Fri, 30 Jun 2023 16:15 .