Whats wrong with this query?

TIME_FORMAT(
			DATE_ADD
				(
					TIMEDIFF(TIMEDIFF(u.hour_end, u.hour_begin),(u.hour_pauze)),
					TIMEDIFF(TIMEDIFF(u.hour_end_o, u.hour_begin_o),(u.hour_pauze_o))
				)
			,'%H:%i') AS total,

I get the error:

#1305 - FUNCTION system.DATE_ADD does not exist

BTW: I am using version 5.0.51a.

that s true ! try it without _

-----
tesu

When I try that, I get the same error, but without the '_'.

Can it be that my query is wrong?

Edit: I have checked and double checked that part of the query, but I do not find a wrong statement in it.

Could you check my query?

You should never believe me, but I have used spaces in my query between the function name and the parenthesis (and then mysql says: function does not exist, because that extra space ' ' after the function(!)).

But my query does not again not work.

SELECT 
	
	TIME_FORMAT(
		DATE_ADD(
			TIMEDIFF(TIMEDIFF(u.hour_end, u.hour_begin),(u.hour_pause)),
			TIMEDIFF(TIMEDIFF(u.hour_end_o, u.hour_begin_o),(u.hour_pause_o))
				),'%H:%i'
				) AS total
FROM 
	hour AS u 
	
WHERE 
	DATE_FORMAT(u.hour_begin, '%H:%i') != '00:00'

Now it says, that I should have a syntax error, at line 6.

If you have some knowledge, can someone check that line?

Edit: I try to use ADDTIME and ADDDATE and so on, but no result yielded.

Edit2: I use now ADDTIME, and it seems working.

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.