Welcome, Guest. Please Login or Register.
July 31, 2025, 08:37:04 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  Archiving: posterTime in regular date format « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Archiving: posterTime in regular date format  (Read 2303 times)
NV
Noobie
*
Posts: 15


I'm a llama!

Archiving: posterTime in regular date format
« on: May 03, 2003, 09:29:43 AM »
Reply with quote

Hi,

to keep my database size low, I want to delete topics from my board and offer them as simple html pages to my forum members.

With phpmyadmin I want to export these topics and created a sql statement which looks for example like this:

SELECT `ID_TOPIC` , `subject` , `posterName` , `posterTime` , `body`
FROM `messages`
WHERE 1 AND `ID_TOPIC` = 349
ORDER BY `posterTime` ASC

the only problem I have is the field 'Postertime' (Unix timestamp). In the final output I want it to appear like a regular date format, like dd-mm-yy.

can anybody hint me how to adjust the sql statement so that it works?

Thanks in advance.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Archiving: posterTime in regular date format
« Reply #1 on: May 03, 2003, 10:00:49 AM »
Reply with quote

SELECT `ID_TOPIC`, `subject`, `posterName`, FROM_UNIXTIME(`posterTime`, '%M %D, %Y, %h:%i:%s %p'), `body`
FROM `messages`
WHERE `ID_TOPIC` = 349
ORDER BY `posterTime` ASC

-[Unknown]
Logged
NV
Noobie
*
Posts: 15


I'm a llama!

Re:Archiving: posterTime in regular date format
« Reply #2 on: May 03, 2003, 10:30:49 AM »
Reply with quote

Thanks! :D
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Archiving: posterTime in regular date format « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.433 seconds with 20 queries.