Jump to content

Archived

This topic is now archived and is closed to further replies.

Acs

Date question

Recommended Posts

Is there any way to convert something like 2006-03-24 to a string like 2006 March Friday. Does php have something like this or do I have to make something that can handle this?

Share this post


Link to post
Share on other sites
Did you look in the online manual at [a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a]?

A quick search would have revealed the [a href=\"http://www.php.net/date\" target=\"_blank\"]date[/a]() and [a href=\"http://www.php.net/strtotime\" target=\"_blank\"]strtotime[/a]() functions.

[code]<?php
$str = '2006-03-24';
echo date('Y F l',strtotime($str));  // the l is a lowercase L, not a captal I or 1
?>[/code]

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.