[HELP]: Get date and time of publication
#1

Hi guys, one question, I'm looking for a way to do a function, or rather, how to get the famous publication time, that is: "X minutes ago", "X hour ago", "X months ago", and successively , exists? an Include, plugin or something?
Obviously I work with MySQL
Greetings and thanks to all
Reply
#2

Publication of what?
Reply
#3

While I don't quite understand what you mean by famous publication time you can use the DATEDIFF mysql function to get the number of days between two dates, you could just then format the result to say "x days ago". You could then re-interpret the number of days to work in terms of months, hours etc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)