DAYOFWEEK

April 12, 2002 by  
Filed under Code Snippets

Here’s a trick Al showed me today. It uses a mysql function called DAYOFWEEK.

$dayofweek = mysql_fetch_row(mysql_query(“select DAYOFWEEK(‘$selectday’)”));

The function returns the day of the week in numerical form. 1 is Sunday, 2 is Monday, 3 is Tuesday, and so on… Jus thought you’d like to know. :)

Related Posts Plugin for WordPress, Blogger...

Comments are closed.