I am trying to calculate duration. I am using MySQL 5.0 but I am getting this error
1305 - FUNCTION smgm.DATEDIFF dose not exist
My query 开发者_Python百科is:
SELECT DATEDIFF (MI,timein,timeout)/60 as duration 
FROM User_smgm
where ID=2;
my database name is SMGM
Any Idea why is this so? Where as when I try simple DATEDIFF it's working fine. Such as I tried
SELECT DATEDIFF('2008-11-30','2008-11-29') DURATION
The datediff function in MySQL gets the difference in days. There is no overload where you can specify a time period. Use the date_sub function instead.
DATEDIFF (MI,timein,timeout)
why do you have three arguments in datediff?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论