DATETIME

    Date: 01/06/08 (PHP Community)    Keywords: php, mysql, sql

    Hi,

    I'm not very experienced with PHP/MYSQL, so I'll try and keep this as simple as possible. :P


    I have dates stored in MySQL as DATETIME.

    In my script, I'm trying to get it to display all the results for week #. Week # being 1-52. (I know in PHP it's displayed with "W")

    ... I have no idea how to do this. :| That is, extract the "W" from the DATETIME.

    I'm guessing I might have to strtotime() it and then date() but then that confuses me because I'd have to be doing it in the calling query itself?

    Eep. Help much appreciated. :)

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

« Parse date from filename || Self-calling loops »


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