Skip to content

Tag: datediff

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()<T…

Sql – Calculate Inventory Days

I’m trying to calculate inventory day’s over time. I have an issue getting the actual amount of day’s in inventory for the last month. So as for the first row, the 9 days is correct. However the second row should show 34. Since I want to calculate the days between Inv_date and “today&#…

Subtract today’s date with date column in SQL [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I have a column in SQL item_expired, this column stores data in the form of dates from other …