Re: [PHP] convert date to reversed date
- From: lists@xxxxxxxxx (Jim Lucas)
- Date: Tue, 30 Jan 2007 07:52:18 -0800
Jim Lucas wrote:
Arpad Ray wrote:$filename = implode(array_reverse(explode('/', $value)));
I should have checked before I wrote. It does work, but through me off, didn't realize that the first arg was optional. Sorry
I think you ment
$filename = implode('', array_reverse(explode('/', $value)));
Arpad
Reinhart Viane wrote:Is this a good way to convert 01/02/2007 to 20070201
$value='01/02/2007';
list($day, $month, $year) = split('[/.-]', $value);
$filename=$year.''.$month.''.$day;
It does work but i would like to verify if there are no better, more logical
ways to do this.
Thanks in advance
--
Enjoy,
Jim Lucas
Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree.
- Rush
.
- Follow-Ups:
- RE: [PHP]SOLVED convert date to reversed date
- From: "Reinhart Viane"
- RE: [PHP]SOLVED convert date to reversed date
- References:
- convert date to reversed date
- From: "Reinhart Viane"
- Re: [PHP] convert date to reversed date
- From: Arpad Ray
- Re: [PHP] convert date to reversed date
- From: Jim Lucas
- convert date to reversed date
- Prev by Date: Re: [PHP] return bounced email to specific email address
- Next by Date: Re: [PHP] Parsing mail file
- Previous by thread: Re: [PHP] convert date to reversed date
- Next by thread: RE: [PHP]SOLVED convert date to reversed date
- Index(es):