Para código php
$weekday[0]="Sun";
$weekday[1]="Mon";
$weekday[2]="Tues";
$weekday[3]="Wed";
$weekday[4]="Thur";
$weekday[5]="Fri";
$weekday[6]="Sat";
$date = '2011/10/14';
$dayName = date('D', strtotime($date));
$dayNumber = date('N', strtotime($date));
echo $dayName; //date name
$prefix = $weekday[$dayNumber]; //custom date name
$query = "select * from table_name where $prefix = 'Y'";