content_image/863006.jpg
• UTC_TIMESTAMP , UTC_TIMESTAMP([ fsp ]) 

Returns the current UTC date and time as a value in ’ YYYY-MM-DD hh:mm:ss ’  or YYYYMMDDhhmmss format, depending on whether the function is used in string or numeric context. 

If the fsp  argument is given to specify a fractional seconds precision from 0 to 6, the return value includes a fractional seconds part of that many digits. 

mysql> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0; -> ’2003-08-14 18:08:04’, 20030814180804.000000 

• WEEK( date [, mode ]) 

This function returns the week number for date . The two-argument form of WEEK()  enables you to specify whether the week starts on Sunday or Monday and whether the return value should be in the range from 0  to 53  or from 1  to 53 . If the mode  argument is omitted, the value of the default_week_format  system variable is used. See Section 5.1.8, “Server System Variables” . 

The following table describes how the mode  argument works. 

<img src='content_image/863006.jpg'>

For mode  values with a meaning of “with 4 or more days this year,”  weeks are numbered according to ISO 8601:1988: 

•If the week containing January 1 has 4 or more days in the new year, it is week 1. 

•Otherwise, it is the last week of the previous year, and the next week is week 1. 

mysql> SELECT WEEK(’2008-02-20’); -> 7 mysql> SELECT WEEK(’2008-02-20’,0); -> 7 mysql> SELECT WEEK(’2008-02-20’,1); -> 8 mysql> SELECT WEEK(’2008-12-31’,1); 

