Hi.
Thank you. I checked the script and it looks fine, in fact similar to what I just wrote on my own .
I tested the script on a 12.6 System as well, and also there the result was correct :
bop_cmd -f test.frg "check_workshift('10/17/2017 16:00:00', '10/19/2017 10:30:00','Test')"
Workshift
---------
'Mon - Fri { 8:30 am - 6:00 pm }
05/01/2017
08/15/2017
10/02/2017
10/18/2017
12/25/2017
'
Start : '10/17/2017 16:00:00
'End : '10/19/2017 10:30:00
'Duration in seconds: '14400
'Duration in minutes: '240'
Duration in hours: '4.000000'
So it really seems to be a 12.5 problem.
Just one last chance: for making sure, that there are no strange bytes or characters in your workshift definition, which might cause the wrong behaviour, do the following:
pdm_extract -f "select sym, sched from Bop_Workshift where sym='Test'"
and post the outcome here.
the result of the above command for me looks like:
{ "Test" ,"Mon - Fri { 8:30 am - 6:00 pm }\\001205/01/2017\\001208/15/2017\\001210/02/2017\\001210/18/2017\\001212/25/2017" }
And a second idea: what happens if you try to use the following workshift?
Mon - Fri { 8:30 am - 6:00 pm }
05/01/2017 {}
08/15/2017 {}
10/02/2017 {}
10/18/2017 {}
12/25/2017 {}
Thanks
...........Michael