strftime formatting issue

    Date: 07/11/06 (PHP Community)    Keywords: mysql, sql

    When I use the following:

    strftime('%C-%m-%d', $timestamp)

    where $timestamp for example is 1144788825, this is how it formats the date:
    Tue Apr 11 13:53:45 PDT 2006-04-11

    All I want is the 2006-04-11, because that matches the format of a date stored in MYSQL. Any idea why it is prepending it with the TUe Apr 11 and the full time etc. The manual on strftime is not helpful.

    Edit:I do realize that I can strip off the 10 characters at the end to get the part I want using substr()

    Thanks!

    Source: http://community.livejournal.com/php/468503.html

« function to round a number... || Dreamhost and include() »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home