>>>>> "Juan" == Juan Riera <jriera@stripped> writes:
Juan> For some weeks I have been trying to find alternatives to week() function on
Juan> MySQL allowing to format dates (datetime field) as week number using ISO
Juan> format (first week of the year is week with the first thursday on it, or
Juan> week with four complete days). I have found perl and PHP alternatives, but I
Juan> definitely need a MySQL function as I need to group data on SQL query, and
Juan> not only formatting dates. As I am not a C programmer, I have not tried to
Juan> develop a MySQL function to do this date formatting, but I wonder if (a)
Juan> could it be done, and (b) has anyone a valid alternative for grouping values
Juan> on iso week number as a result of an MySQL query.
Juan> Anyway, I send to you my humble request to find this option on new MySQL
Juan> versions as a new option added to week() function!
Note that both the WEEK() function and DATE_FORMAT() can handle weeks
that starts with Sunday or Monday (another way too look at your week
Just take a look in the MySQL manual for the above functions!