MySQL date display in php ...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jmueller0823
Forum Commoner
Posts: 37
Joined: Tue Apr 20, 2004 9:06 pm

MySQL date display in php ...

Post by jmueller0823 »

The date/time data looks like this: 1175114705

How do I get that to display properly?

Thanks!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
Josh1billion
Forum Contributor
Posts: 316
Joined: Tue Sep 11, 2007 3:25 pm

Post by Josh1billion »

Use date(), with the second parameter being that timestamp (1175114705). And the first parameter, as always, is the format.

Example:

Code: Select all

$new_date = date("m/d/y H:i:s", 1175114705);
Post Reply