====== dow ======
~~NOTOC~~
**From Version 5.21.0-beta-2**
== See Also ==
[[v5:reference:connection:month|day()]]\\
[[v5:reference:connection:month|month()]]\\
[[v5:reference:connection:year|year()]]\\
== Syntax ==
string dow(
string $fieldName,
)
===== Description =====
The method ''dow()'' is a routine that provides a portable Day-Of-Week number from 0 to 6, starting on a Sunday. Normal day of week functions use varying start days, and offset numbers. For more information on the subject, see [[v5:reference:connection:sqldate|sqlDate()]].
The start day and numbering matches the [[http://php.net/manual/en/function.date.php|PHP Date]] function.
===== Parameters =====
==== $fieldName ====
The date/time fieldname to be processed
--------------------------------
== Values ==
|0|Sunday|
|1|Monday|
|2|Tuesday|
|3|Wednesday|
|4|Thursday|
|5|Friday|
|6|Saturday|
===== Usage =====
$sql = "SELECT {$db->dow('birth_date')}
FROM employees
WHERE emp_no = 10
$dayOfWeek = $db->getOne($sql);