For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > October 2005 > Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26
voipcanada

2005-10-25, 3:55 am

need to know how to change Mon Oct 24 00:00:26 2005 as 2005-10-24
00:00:26

thanks

IWT

2005-10-25, 3:55 am

date("Y-m-d H:i:s") would print in the format 2005-10-24 00:00:26.

See: http://uk2.php.net/manual/en/function.date.php

NC

2005-10-25, 6:56 pm

voipcanada wrote:
>
> need to know how to change Mon Oct 24 00:00:26 2005 as 2005-10-24
> 00:00:26


date('Y-m-d H:m:s', strtotime('Mon Oct 24 00:00:26 2005'))

Cheers,
NC

Chuck Anderson

2005-10-25, 6:56 pm

NC wrote:

>voipcanada wrote:
>
>
>
>date('Y-m-d H:m:s', strtotime('Mon Oct 24 00:00:26 2005'))
>
>Cheers,
>NC
>

I wasn't aware of this shortcut. I think I'll switch to this method for
converting times from my apache server access logs.

However, you meant:
echo date('Y-m-d H:i:s', .....
not
echo date('Y-m-d H:m:s', .....

(i for minutes, not m)

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*****************************
NC

2005-10-25, 9:55 pm

Chuck Anderson wrote:
> NC wrote:
>
> I wasn't aware of this shortcut. I think I'll switch to this method for
> converting times from my apache server access logs.
>
> However, you meant:
> echo date('Y-m-d H:i:s', .....
> not
> echo date('Y-m-d H:m:s', .....
>
> (i for minutes, not m)


Of course. A really dumb typo... Thank you for your correction.

Cheers,
NC

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com