time left format
I was looking over at the Mysql website trying to find out how i could calculate the difference between 2 timestamps.
you know when you go to an auction website they have the days hours minutes and seconds left on the auction.
example : 2 days 14hours 5 min 22 seconds.
this is what i thought would work.
date_format((enddate - startdate ) '%e days %H hours %i min %S seconds') as timeleft
any help would be great! thanks.
but i'm looking for a Mysql way to do it. I'm sure it can be done just using Mysql.
Oops, sorry about that. I'm not very familiar with MySQL but it seems that it doesn't support a function similar to DateDiff in VB. The only functions available would be those listed here :
that's where i was looking for a solution but i could not find one.
Humm.. what about using the Date_Add() or Date_Sub() functions ?