Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

fccoelho7

[Resolvido] Como mudar o fomato de exibição da data?

Recommended Posts

Pessoal, já pesquisei sobre DATE_FORMAT() mas não consigo implementar no meu script, como faço para mudar a data de exibição? Gostaria de exibir (dia/mes/ano)

 

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Administração de Notícias</title>
<link rel="stylesheet" media="screen" href="css/style.css" />
</head>

<body>
<section id="wrap">
	<section id="login">
        	<?php
		echo "<img src='imgs/user.png'/> <b>Usuário:</b> Fábio Carvalho Coelho<br/><img src='imgs/cancel.png'/> <b>Sair</b>";
		?>
        </section>
	<h1>Administrar Notícias</h1>
        <a href="add.php"><img src="imgs/add.png"/> Adcionar Notícia</a>
        <table cellpadding="0" cellspacing="0">
        	<tr>
                	<th>ID</th>
                	<th>Título</th>
                	<th>Prévia</th>
                	<th>Conteúdo</th>
					<th>Data</th>
                	<th>Editar</th>
                	<th>Deletar</th>
                <tr>
                <?php
		include ("conexao.php");
		
		$sql = mysql_query("SELECT * FROM noticias");
		while($x = mysql_fetch_array($sql)){
			echo "<tr>";
			echo "<td>".$x['id']."</td>";
			echo "<td>".$x['titulo']."</td>";
			echo "<td>".$x['previa']."</td>";
			echo "<td>".$x['conteudo']."</td>";
			echo "<td>".$x['data']."</td>";
			echo "<td><a href='editar.php?id=".$x['id']."'><img src='imgs/edit.png' /></a></td>";
			echo "<td><a href='deletar.php?id=".$x['id']."'><img src='imgs/delete.png' /></a></td>";
			echo "</tr>";
		}
		?>
        </table>
</section>
</body>
</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.