My table has sample data and I need to calculate business hrs between two timestamps in two columns. Business hrs : 9:00am to 5:00pm and neglect Saturday and Sunday, I am not co
try
SELECT (FLOOR(DATEDIFF (UpdatedDate, CreatedDate) / 7) * 5 + MOD (DATEDIFF (UpdatedDate, CreatedDate), 7)) * 8 +
TIMEDIFF (TIME (UpdatedDate), TIME(CreatedDate))
FROM YourTable
The above is not complete as it only "estimates" the weekends... but it should get you started... another option is to work with a table of valid businesshours (for details see this answer from Laurence).
For reference see MySQL documentation.