PDA

View Full Version : Displaying the Date


JackFranklin
11-16-2008, 03:23 PM
Hi,

How can I query the date when a thread was posted? I'm guessing it's stored in the dateline column but have no idea how to format it.

Lynne
11-16-2008, 03:48 PM
Here are the two lines you can use to get the date and the time from $threads['dateline'].
$threads['date'] = vbdate($vbulletin->options['dateformat'],$threads['dateline']);
$threads['time'] = vbdate($vbulletin->options['timeformat'],$threads['dateline']);

JackFranklin
11-16-2008, 03:58 PM
Thanks Lynne.

However I'm trying to get the date but not on a VBulletin page, so do I need to include some files?

Lynne
11-16-2008, 04:34 PM
I'm using that on a non-vB page and I included the global.php at the top:
require_once('./global.php');

JackFranklin
11-16-2008, 05:14 PM
Thanks Lynne worked great.