Forum Moderators: coopster

Message Too Old, No Replies

format date

         

kristof_v

8:18 pm on Oct 2, 2006 (gmt 0)

10+ Year Member



hi,

in the database i have date values in this format: m.d.Y (eg 10.10.2006)
now i want to show the date values in a table in the following format: D M j, Y

so i tried this:

echo '<td>'.date("D M j, Y", $row['deadline']).'</td>';

but this gives the well-known Thu Jan 1, 1970 for every date value

how do I do this?

grtz

Little_G

8:28 pm on Oct 2, 2006 (gmt 0)

10+ Year Member



Hi,

try:

echo '<td>'.date("D M j, Y", strtotime($row['deadline'])).'</td>';strtotime

Andrew

kristof_v

8:37 pm on Oct 2, 2006 (gmt 0)

10+ Year Member



thx for your suggestion.
unfortunately it didn't do the trick :(

other suggestions?

grtz

jatar_k

8:40 pm on Oct 2, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



split/explode the db date on .

then feed the values to mktime

then feed that through date