user188962
user188962

Reputation:

Convert date format from mysql TIMESTAMP help

have one problem, I need the dates in Swedish format, for instance, october is in swedish oktober... How can I do this?

This works so far for english dates:

      $date = date( "j F", strtotime( $row[insert_date] ) );

$display_table .= "$date";

Upvotes: 1

Views: 842

Answers (2)

Mark
Mark

Reputation: 6254

An alternative to Rudisimo's answer is making mysql do the work for you:

SELECT DATE_FORMAT(`insert_date`,'%d %M') AS insert_date FROM `table_name` WHERE [...]

Upvotes: 1

Rudisimo
Rudisimo

Reputation: 342

Something like this might help:

$date = date( "j F", strtotime( $row[insert_date] ) );
$display_table .= "<td width='67' rowspan='2'>$date</td>";

Upvotes: 1

Related Questions