I'm trying to calculate the following value, which I'm getting from my database 2014-08-29 04:37:36
I want to calculate this value within current date time.
Like my above value is 2014-08-29 04:37:36
but I want to show 3 days left
instead 2014-08-29 04:37:36
. If my value is 2014-08-23 04:37:36
it should show -2 days left
.
Whatever my value is, i want to calculate it and show the time left, if it expired than it should show a minus sign as I explained above. Can anyone help me please!!
This question is much simpler and different than the references given to mark as duplicate. My question is clear and simple, not complex to the references given by HAL9000, Boann, karthikr, amphetamachine, Shankar Damodaran. Also the references are misleading my question.