ecabrera Posted April 13, 2015 Share Posted April 13, 2015 ok im stuck at how to calculate the pay. for example how would i calculate 14 hours and 42mins * Pay Salary i tried this 14.42 * 15 = 216.3 but im pretty sure thats off by a few cents or dollars. Any idea how to go about it Link to comment https://forums.phpfreaks.com/topic/295509-calculating-pay-x-hours/ Share on other sites More sharing options...
maxxd Posted April 13, 2015 Share Posted April 13, 2015 You need to convert the minutes into a decimal value. For instance, 14 hours, 30 minutes equates to 14.5 * 15 = 217.50. Link to comment https://forums.phpfreaks.com/topic/295509-calculating-pay-x-hours/#findComment-1508919 Share on other sites More sharing options...
Barand Posted April 13, 2015 Share Posted April 13, 2015 You need ($hours + $minutes/60) * $pay Link to comment https://forums.phpfreaks.com/topic/295509-calculating-pay-x-hours/#findComment-1508925 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.