Carlos Fernando Scheidecker Antunes wrote:
> If I issue the comand date(d."/".m."/".Y." ".H.":".i.":".s)
> I get the Today's date and time formated accordingly.
Don't you want to put the letters inside the quotes?
> So what I need is to format variable $OrderDate to Day/Month/year Hour:Min:Sec.. How
>can I do it the same way as the Date() function above?
I guess $OrderDate is in the DATETIME format and not the DATE, in which case you'd
only have, well, the date and not the time. If this is the case, then the format of
the $OrderDate string will be 'YYYY-MM-DD
HH:MM:SS'. I haven't tried, but this should work:
<?
list($year, $month, $day, $hours, $mins, $secs) = split('[- :]', $OrderDate);
?>
There's probably heaps of ways to do this, but this is (hopefully) one.
<http://www.php.net/manual/en/function.split.php>
--Fredrik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]