The Arcive of vBulletin Modifications Site. |
|
Dateline in the Thread table - how to convert? Details »»
|
|||||||||||||||||||||||||||
|
Dateline in the Thread table - how to convert?
Developer Last Online: Jan 2010
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 Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Use the vbdate() function of vBulletin. For example:
Code:
$formattedDate = vbDate($dateformat, $threadinfo['dateline']); |
|
#3
|
|||
|
|||
|
That's exactly what I needed. Thanks!
Mickey |
|
#4
|
|||
|
|||
|
Is there anyway to convert it, if NOT using a VBpage?
|
|
#5
|
||||
|
||||
|
theres also the normal php function date()
|
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
|||
|
|||
|
I found it by searching a bit harder
https://vborg.vbsupport.ru/showthrea...=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/forum...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 |
![]() |
|
|