The days was needed as part of the argument for the MDYHMS function to work.
You could try the following example,
sdt << Select Where(
(:Date and Time => 08:00:00 ) & (:Date and Time <= 18:00:00 )
);
Hopefully, JMP will interpret the :Date and Time variable correctly in the row selection. Otherwise, you could use multiple conditions for several dates in the time range you want. For example,
Sdt << Select Where(
( :Date and Time => Informat( “15May2017:08:00:00”, “MDYHMS”) ) & (:Date and Time <= Informat( “19May2017:06:00:00”, “MDYHMS”) ) or
( :Date and Time => Informat( “22May2017:08:00:00”, “MDYHMS”)) & (:Date and Time <= Informat( “26May2017:06:00:00”, “MDYHMS”) ) or
( :Date and Time => Informat( “29May2017:08:00:00”, “MDYHMS”) ) & (:Date and Time <= Informat( “02Jun2017:06:00:00”, “MDYHMS”) ) or
/* other future dates through to Jul29 2017 */
( :Date and Time => Informat( “24July2017:08:00:00”, “MDYHMS”) ) & (:Date and Time <= Informat( “28July2017:06:00:00”, “MDYHMS”) )
) ;