Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtracting using base 8 instead of the normal base 10!! Pls Help

Status
Not open for further replies.

Forri

Programmer
Oct 29, 2003
479
MT
Hi all

I know this is not exactly a PHP problem but since there is much experience maybe u can help...

I have a system which calculates leave days and hours based on a normal day of 8 hrs!

I would like to base it immediatly to 8, if not i have to stay checking the everytime if the value is equal (which makes it a 0) or greater then 8 (which will result in reminder of the Value divided by 8)

It gets too complicated....

is there a work around to this type of problem...?

Thanks
Nick
 
You could look at the functions base_convert(), octdec() and decoct()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top