December 6th, 2012, 08:31 AM
Amount calculation based on time in mysql?
I am new developer, i have a doubt in my application, i have to calculate the amount based on minutes in my sql.
in my application i have stored the current date and time in datetime format in mysql.
for example my application process is start session and close session based on the time interval the amount to be calculate.
one use login in the time of(6.00) that use close session is (7.15)
time interval is 1.15 hrs, per 30 mins amount is 15 how i can calculate the 1.15 hrs.. and 1.30 hrs, 2 hrs.... cont...
i hope some one help me..
December 6th, 2012, 10:25 AM
use the TIMEDIFF function