Date display format

4 posts by 4 authors in: Forums > CMS Builder
Last Post: April 8, 2010   (RSS)

By squeazel - July 5, 2008

I'm having difficulty getting entry dates to display properly.

As a test, I have the following in my code:

<?php echo date("t F Y", $record['date']); ?><?php echo $record['date'] ?>

Sample output from the above looks like this:

31 January 19702008-06-28 00:00:00

So, on the right, the correct date is being pulled in, however somehow I am not translating it properly, and the date via the date function is generic, rather that what's in the CMS.

Any thoughts?

Re: [Dave] Date display format

By ikanizaj - April 8, 2010

To addon a question:

What's the code to display this date 8th. Apr 2010. 5:30pm in this format 8.4.2010. 17:30

thanks for the answer?
--
Igor Kani¾aj

Re: [ikanizaj] Date display format

By Djulia - April 8, 2010 - edited: April 8, 2010

Hi [font "Verdana"]Igor,

Test : <?php echo date("j.n.Y. H:i", strtotime($record['createdDate'])); ?>

http://www.php.net/manual/en/function.date.php[/#336699]

Djulia