FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » how format one date
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: how format one date [message #179062 is a reply to message #179058] Fri, 07 September 2012 20:05 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 07-09-2012 17:20, nawfer wrote:
> Il Fri, 7 Sep 2012 15:10:49 +0000 (UTC), Salvatore ha scritto:
>
>> $formattedDate = '06/09/2012 - 23:50';
>> define('LOCAL_DATE_FORMAT', '%d/%m/%Y - %R');
>>
>> // Break apart the date.
>> $dateArray = strptime($formattedDate, LOCAL_DATE_FORMAT);
>> $reformattedDate = sprintf('%04d-%02d-%02dT%02d:%02d:00', $dateArray['tm_year'] + 1900, $dateArray['tm_mon'] + 1, $dateArray['tm_mday'], $dateArray['tm_hour'], $dateArray['tm_min']);
>
>
> I have this error
> Call to undefined function strptime()
>
> I use php 5.2.10
>

http://php.net/manual/en/function.strptime.php
says:
strptime
(PHP 5 >= 5.1.0)

hmmm, interesting...... ;)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Converting eps to png
Next Topic: Never log deprecation warnings
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 16:08:50 GMT 2024

Total time taken to generate the page: 0.04408 seconds