PDA

View Full Version : Convert timestamp to readeable format?


SnakeV
10-16-2015, 12:16 PM
Hi,

I'm trying to get the last reply date of a thread for displaying it on the SHOWTHREAD template.

I have found that $thread[lastpost] display the last reply on a timestamp, ex: 1444930933

I tried to convert it using vbdate on a plugin:

$lastreplydate=vbdate('m-d-Y',$thread[lastpost]);

But doesn't seem to work it doesn't retrieve anything, which could be the problem?

Thanks

MarkFL
10-16-2015, 12:23 PM
Try using:

vbdate($vbulletin->options['dateformat'], $thread['lastpost'], 1)