PDA

View Full Version : Dateline in the Thread table - how to convert?


mickmel
04-23-2002, 07:57 PM
I'm pulling out threads for a little script I'm making, and I want to pull the date that the thread was started as well. The dateline field is probably what it wants, but it looks like "981293929", and I want it to look like "04-23-2002". I'm sure it's just some simple PHP code, but I can't quite figure it out. Any help?

Thanks!

Mickey

Admin
04-24-2002, 08:49 AM
Use the vbdate() function of vBulletin. For example:
$formattedDate = vbDate($dateformat, $threadinfo['dateline']);

mickmel
04-24-2002, 02:06 PM
That's exactly what I needed. Thanks!

Mickey

JBMoney
10-03-2002, 08:09 PM
Is there anyway to convert it, if NOT using a VBpage?

Xenon
10-03-2002, 10:13 PM
theres also the normal php function date()

ashy
10-08-2002, 03:50 AM
How can i include the formatted date (dateline) in the forumdisplaybit template? I have set up the extra table column ok but not sure how to include the date as formatted.

ashy
10-08-2002, 04:08 AM
I found it by searching a bit harder

https://vborg.vbsupport.ru/showthread.php?s=&threadid=18219&highlight=lastreplydate
(second method)

In my case I wanted the date to show on a news forum so I put in the date as
$thread[firstpostdate] = date("D j M", $thread["dateline"]);

I also used the hack to make this forum only display in date order.

My news forum http://www.southportforums.com/forums/forumdisplay.php?forumid=27

Looks really good - the main attraction of my site offering daily local news and the news syndicate hack so appears on our home page like http://www.southport.gb.com