Can anyone help please?
I'm using a UNIX time stamp to work out the difference between two dates so I am left with a result in seconds. I divide that number by 60 (to get minutes) and then 60 again (to get hours) then by 24 to get days and store these numbers in variables; I then round the result using the round() function to get a whole number.
What I am working on is taking the numbers and working out a query to give me results such as "This record was posted 2 days ago" or "This record was posted 10 minutes ago".
I have got this working using IF ELSE statements but my entire code is filled with nested IF ELSE statements.
Can anyone tell me of an easier and more efficient way to do this please?
Thanks in advance for any help.