User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Jun 2008
Posts: 45
Reputation: kvdd is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
kvdd kvdd is offline Offline
Light Poster

Function ADD_DATE does not exist.

  #1  
Jul 2nd, 2008
Whats wrong with this query?

  1. TIME_FORMAT(
  2. DATE_ADD
  3. (
  4. TIMEDIFF(TIMEDIFF(u.hour_end, u.hour_begin),(u.hour_pauze)),
  5. TIMEDIFF(TIMEDIFF(u.hour_end_o, u.hour_begin_o),(u.hour_pauze_o))
  6. )
  7. ,'%H:%i') AS total,

I get the error:
#1305 - FUNCTION system.DATE_ADD does not exist
BTW: I am using version 5.0.51a.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2008
Posts: 295
Reputation: tesuji is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 41
tesuji tesuji is offline Offline
Posting Whiz in Training

Re: Function ADD_DATE does not exist.

  #2  
Jul 2nd, 2008
that s true ! try it without _

-----
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.
Reply With Quote  
Join Date: Jun 2008
Posts: 45
Reputation: kvdd is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
kvdd kvdd is offline Offline
Light Poster

Re: Function ADD_DATE does not exist.

  #3  
Jul 3rd, 2008
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?
Last edited by kvdd : Jul 3rd, 2008 at 2:46 am.
Reply With Quote  
Join Date: Jun 2008
Posts: 45
Reputation: kvdd is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
kvdd kvdd is offline Offline
Light Poster

Re: Function ADD_DATE does not exist.

  #4  
Jul 3rd, 2008
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.

  1. SELECT
  2.  
  3. TIME_FORMAT(
  4. DATE_ADD(
  5. TIMEDIFF(TIMEDIFF(u.hour_end, u.hour_begin),(u.hour_pause)),
  6. TIMEDIFF(TIMEDIFF(u.hour_end_o, u.hour_begin_o),(u.hour_pause_o))
  7. ),'%H:%i'
  8. ) AS total
  9. FROM
  10. HOUR AS u
  11.  
  12. WHERE
  13. 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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the MySQL Forum

All times are GMT -4. The time now is 6:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC