List:General Discussion« Previous MessageNext Message »
From:Aldrian Gintingsuka Date:September 27 1999 9:21am
Subject:RE: About ISO week # formatting in MySQL
View as plain text  
Hello,

I can't seem to replicate your output. I had a problem with the WEEK function
some months ago and somebody explained to me about the ISO rule. I tested the
standard on MySQL and MySQL did follow the standard.

Was it just luck? or is MySQL not following the ISO??

MySQL-3.23.3 compiled with gcc-2.95.1
Solaris 2.6 for SPARC

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2406 to server version: 3.23.3-alpha

Type 'help' for help.

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 1999-09-27 16:13:16 |
+---------------------+
1 row in set (0.08 sec)

mysql> select week(now());
+-------------+
| week(now()) |
+-------------+
|          39 |
+-------------+
1 row in set (0.03 sec)

mysql> select week('1999-09-27');
+--------------------+
| week('1999-09-27') |
+--------------------+
|                 39 |
+--------------------+
1 row in set (0.00 sec)

========================================================================
Aldrian Gintingsuka -- Systems Consultant -- Mitra Integrasi Informatika
Phone: +62-21-251-1360 ext. 1414 -- Fax: +62-21-251-2748
Email: aldrian@stripped, aldrian@stripped
------------------------------------------------------------------------
Si tu es contre Dieu, tu es contre l'homme (Enigma: Sadeness part I)



On Mon, 27 Sep 1999, Juan Riera wrote:

jriera> Hello,
jriera> I have been using this option (start week on monday) for weeks, and this is
jriera> a very helpful one for all those non-british using MySQL. However, my week
jriera> problem is different, as I need to group yearly sales data by week. This
jriera> week beggining *today* (monday 27-Sep) is on your week() function week #40,
jriera> however on ISO # is week #39 !
jriera> As you may suppose, this is not the same for sales team! and I am been
jriera> requested to use ISO week # as it is used widely on Spain.
jriera> By the moment I am substracting one from week() result, but this will work
jriera> only to end december...
jriera> Will I see it on next MySQL version?
jriera> 
jriera> Regards,
jriera> Juan
jriera> 



Thread
About ISO week # formatting in MySQLJuan Riera26 Sep
  • About ISO week # formatting in MySQLMichael Widenius26 Sep
  • RE: About ISO week # formatting in MySQLJuan Riera27 Sep
    • RE: About ISO week # formatting in MySQLAldrian Gintingsuka27 Sep
    • RE: About ISO week # formatting in MySQLMichael Widenius27 Sep
      • RE: About ISO week # formatting in MySQLbkline28 Sep
        • RE: About ISO week # formatting in MySQLPeter Strömberg28 Sep
      • Re: About ISO week # formatting in MySQLMartin Ramsch28 Sep
        • Re: About ISO week # formatting in MySQLPeter Strömberg28 Sep
          • Re: About ISO week # formatting in MySQLAldrian Gintingsuka28 Sep
            • Re: About ISO week # formatting in MySQLMartin Ramsch28 Sep
            • Re: About ISO week # formatting in MySQLBob Kline28 Sep
          • Re: About ISO week # formatting in MySQLMatthias Urlichs28 Sep
            • Re: About ISO week # formatting in MySQLPeter Strömberg28 Sep
              • Re: About ISO week # formatting in MySQLMichael Widenius29 Sep
            • Re: About ISO week # formatting in MySQLBob Kline28 Sep
              • Re: About ISO week # formatting in MySQLMatthias Urlichs29 Sep
          • RE: About ISO week # formatting in MySQLJuan Riera30 Sep
            • Re: About ISO week # formatting in MySQLMartin Ramsch30 Sep
        • Re: About ISO week # formatting in MySQLMartin Ramsch28 Sep
          • Re: About ISO week # formatting in MySQLBob Kline28 Sep
            • Re: About ISO week # formatting in MySQLMartin Ramsch28 Sep
              • Re: About ISO week # formatting in MySQLBob Kline28 Sep
                • Re: About ISO week # formatting in MySQLMartin Ramsch28 Sep
                  • Re: About ISO week # formatting in MySQLBob Kline29 Sep
                • Re: About ISO week # formatting in MySQLMartin Ramsch29 Sep