WEEKDAY(): function in a mysql date and time field

Returns the Day number within the week from a date .
SELECT WEEKDAY('2016-09-21')
Output is 2
For a invalid date we will get Null as output
SELECT WEEKDAY('2015-02-31')
Output is NULL Output of WEEKDAY() function is from 0 to 6,
0 for Monday, 1 for Tuesday .... 6 for Sunday
Your Rating

Post Comment This is for short comments only. Use the forum for more discussions.

HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer