I’m giving input to TIMESTAMPDIFF(HOUR,'29-10-2012','19-11-2012') but I’m getting output as 504 but the value should be 510.
The output is 510 because start value is 29/10/2012 05:13.
Is there alternative to this function which gives Day,Hour,Minute,Second difference between two dates?
You pass DATE values in TIMESTAMPDIFF function, all is correct –
72 + 432 = 504
If you want to count hours, minutes or seconds, then you should pass two DATETIME values –