Database Abstraction Layer for PHP

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
v5:reference:connection:sqldate [2016/04/13 02:43]
v5:reference:connection:sqldate [2016/04/22 03:08] (current)
mnewnham [Other Periods]
Line 32: Line 32:
 |W|Week of the year as a number (1-52)| |W|Week of the year as a number (1-52)|
 |l|Day of week as full word (Monday, Tuesday, etc)| |l|Day of week as full word (Monday, Tuesday, etc)|
 +<WRAP important 100%>
 +Day of week code (''w'') is not consistently implemented across DB drivers, as the library relies on database-specific functions, e.g.
 +  * [[|MySQL]]: 0 (Sunday) to 6 (Saturday)
 +  * MSSQL: not implemented
 +  * [[|Oracle]]: 1 to 7 (which day is 1 depends on [[|NLS_TERRITORY]] setting)
 +  * [[|PostgreSQL]]: 1 (Sunday) to 7 (Saturday)
 +For a portable result, see the [[v5:reference:connection:dow|dow()]] method.
 ===== Usage ===== ===== Usage =====
v5/reference/connection/sqldate.1460508227.txt.gz · Last modified: 2017/04/21 11:32 (external edit)