Re: reformatting date string

From: Date: Tue, 29 Aug 2000 15:57:31 +0000
Subject: Re: reformatting date string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14158@lists.php.net to get a copy of this message
Hey, use substring to write year, month and day into $y, $m, and $d, then convert it into standard unix timestamp, this command: mktime(int hour, int minute, int second, int month, int day, int year, int [is_dst]); and use it like this: mktime(0,0,0,$m,$d,$y); This will solve all your problems: strftime('%B %d %Y', mktime(0,0,0,$m,$d,$y)); enjoy, :-) Ahmad Anvari ----- Original Message ----- From: "dbarber" <dbarber@sailnet.com> To: <php-general@lists.php.net> Sent: Tuesday, August 29, 2000 8:18 PM Subject: [PHP] reformatting date string > Hi, > > I'm trying to do something which should be very simple, but I can't seem > to make it work with any of the date functions or regular > expressions. > > I'm trying to take a timestamp from in the format of '20000826' and > change it to 'Aug 26, 2000'. The timestamps change with every entry. > > If anyone can help, I'd appreciate it. > > thanks, > > Dan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#14158) next »