Thanks for the reply Bill,

The only issue is that both lightsetHR1 and lightsetMN1 are initially zero value when powered up, where as CH1_on_time is read back from memory so will always have a value. so doing lightsetHR1=lightsetHR1/60 will give 0 as the result.

What I'm after is convert the stored value in CH1_on_time back into it's whole hours and minutes values and place then into lightsetHR and lightsetMN..

Taking my 14:30 time as the example, the resulting value is 870, so dividing that by 60 gives 14.5 which as I mentioned isn't supported in PBP. The normal practice is to multiply the result by 10 to get a hole number and then somehow divide that once it's been processed...thus being complicated !

What I need is basically to divide the result (870) by 60, ignore the 0.5 remainder, then multiply the integer by 60 to get the hole hour equivalent (840 for the 14 hrs) then deduct this from the 870 and place the result (30) in lightsetMN1... it's finding a way to ignore the 0.5 so that only the integer part is used