•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 423,108 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,354 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 530 | Replies: 3 | Solved
![]() |
•
•
Join Date: Jun 2008
Posts: 45
Reputation:
Rep Power: 1
Solved Threads: 2
Whats wrong with this query?
I get the error:
BTW: I am using version 5.0.51a.
mysql Syntax (Toggle Plain Text)
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
•
•
Join Date: Apr 2008
Posts: 295
Reputation:
Rep Power: 1
Solved Threads: 41
that s true ! try it without _
-----
tesu
-----
tesu
Information is moving—you know, nightly news is one way, of course, but it's also moving through the blogosphere and through the Internets. I promise you I will listen to what has been said here, even though I wasn't here. Ann and I will carry out this equivocal message to the world. I'm the master of low expectations.
•
•
Join Date: Jun 2008
Posts: 45
Reputation:
Rep Power: 1
Solved Threads: 2
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.
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.
But my query does not again not work.
mysql Syntax (Toggle Plain Text)
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.
Last edited by kvdd : Jul 3rd, 2008 at 3:37 am.
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the MySQL Forum
- Previous Thread: MySQL delete specific row
- Next Thread: Calculate time with sometimes an 00:00:00 field


Linear Mode