Hello everybody,
convert /mm/dd to mm/dd/, how?
MYSQL does everything in /mm/dd.
I live in the Netherlands and we are use to the format dd/mm/.
What's the best way to display it as mm/dd/ in a table on a query?
My first idea whas to split the date up in vars in php and
Hiya,
Personally, I use the following bit of code. All it does is take a 14 digit
timestamp and convert it into a unix timestamp:
function date($date) {
//Extract the parts from the date
$year = substr($date, 0, 4);
$month = substr($date, 4, 2);
$day = substr($date, 6, 2);
on 1/13/02 12:56 PM, Sander Peters at [EMAIL PROTECTED] wrote:
My first idea whas to split the date up in vars in php and then print
the vars in the way I like it
Is this a bad idea? Or are there better sollutions?
that's the way i do it. i have 2 functions i use all the time for getting
MySQL has plenty of functions to return dates to you in any format you
specify. Please read
http://mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions
and pay special attention to the DATE_FORMAT() function.
-Rasmus
On Sun, 13 Jan 2002, Sander Peters wrote:
)?
Regards,
=dn
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Sander Peters [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 13 January 2002 19:52
Subject: [PHP-DB] Re: [PHP] convert /mm/dd to mm/dd/, how?
MySQL has plenty of functions to return dates
(and possibly in some situations, vice-versa)?
Regards,
=dn
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Sander Peters [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 13 January 2002 19:52
Subject: [PHP-DB] Re: [PHP] convert /mm/dd to mm/dd/
6 matches
Mail list logo