var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: display date format as dd-mm-yy in PHPMyAdmin
It's my first post here and I'm also a MySQL noob, but I know a few things, just not this
I have a table that has the following structure:
Field = timevalue
Value = 1187962147
I'd like to see the date Value displayed as dd-mm-yy instead of 1187962147 in PHPMyAdmin. How?
okay, first of all, you should be using INTEGER, not VARCHAR
to display a unix epoch number as a date, use the FROM_UNIXTIME function
might not work on a string, but maybe mysql will convert it implicitly
Hey r937 I did that and got this error:
Originally Posted by
tbl_replace.php: Missing parameter: goto (
Last edited by Leafgreen; 04-08-08 at
okay, would you like me to move this thread to the php forum?
If you're using PHPMyAdmin you're going to have to convert it using the SQL syntax, however if you intend to extra the information from MySQL first then parse it in your own PHP script then consider using:
$date = '1187962147';
$date = date('d-m-Y', strtotime($date));
sounds like a good reason to revisit the dsign of the db and fix the problem in the first place.. store a date as a date and be doen with the problem.
Thanks all. Right, I have no idea why the devs who designed the db used that system for the date.
somebody told them that integers were more efficient, and they
drank the koolaid