Skip to content
Advertisement

How to use DateDIFF function in mysql table

I have a dataset in my library management system and I have used below query to get specific field only.

now I need DATEDIFF function to get the date difference between today date and ReturnDate if there is no any receiveddate value.Further I dont need negative values as well. As an example if currdate()<ToBEReturnDate the value should be zero(mean that there are more time to user to return the book) if not the difference should be there.

FInal output should be as follows,

Are there any method to use datediff function as I required?

Advertisement

Answer

I think it is :

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement