Hi,
Not really a problem, just thought I would start a thread.
I have a client that runs a pool hall and needs to be prompted once table hire has expired. I have added a slim 728*228 pixel KDS to the workstation display configuration (all workstations have that inherent in their licence) with the screen. I needed to kick a "future order" to the KDS. The basic SQL there is:
update micros.chk_dtl
set autofire_time = #time to fire,
ob_delayed_check = 'T'
where chk_num = #chknum;
This will be a SIM script with the time to fire based on the time hired for the table. The reason for this thread is the lack of info online about time calculations. The solution is this: If you add 1 to a timestamp, you get the now + 1 day. So minutes are broken down to decimals of 1. Table here:
Minutes Decimal Time
=============================================
15 0.010416667
30 0.020833333
45 0.03125
60 0.041666667
90 0.0625
120 0.083333333
180 0.125
240 0.166666667
300 0.208333333
360 0.25
1440 1
So to kick off a table reminder to the TS KDS in 2 hours, the SQL becomes:
update micros.chk_dtl
set autofire_time = 0.083333333 + (current timestamp),
ob_delayed_check = 'T'
where chk_num = @cknum;
Not really a problem, just thought I would start a thread.
I have a client that runs a pool hall and needs to be prompted once table hire has expired. I have added a slim 728*228 pixel KDS to the workstation display configuration (all workstations have that inherent in their licence) with the screen. I needed to kick a "future order" to the KDS. The basic SQL there is:
update micros.chk_dtl
set autofire_time = #time to fire,
ob_delayed_check = 'T'
where chk_num = #chknum;
This will be a SIM script with the time to fire based on the time hired for the table. The reason for this thread is the lack of info online about time calculations. The solution is this: If you add 1 to a timestamp, you get the now + 1 day. So minutes are broken down to decimals of 1. Table here:
Minutes Decimal Time
=============================================
15 0.010416667
30 0.020833333
45 0.03125
60 0.041666667
90 0.0625
120 0.083333333
180 0.125
240 0.166666667
300 0.208333333
360 0.25
1440 1
So to kick off a table reminder to the TS KDS in 2 hours, the SQL becomes:
update micros.chk_dtl
set autofire_time = 0.083333333 + (current timestamp),
ob_delayed_check = 'T'
where chk_num = @cknum;