Hi Priya
I'm assuming that you are able to recover the address from the DatePicker but the format is not the way you want it. For example it is displayed numerically like 20120220 (yyyymmdd). So here is a piece of code that will provide you with the day.
Assuming your dateTime Picker returns the date in the following format:
yyyymmdd.
*****CODE START**********
var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
var iMonthStart = [0,3,3,6,1,4,6,2,5,0,3,5,6,2];
var date = myDatePicker.selectedDate();
var century = date.substring(0,2);
var year = date.substring(2,2);
var month = date.substring(4,2);
var day = date.substring(6,2);
var centuryForCalc = 2*(3-(century%4));
var yearForCalc = year/4;
var yearFull = date.substring(0,4);
var iModLeap = yearFull%4;
var monthTblVal = 0;
if(iModLeap == 0)
{
if(month == 1)
{
monthTblVal = 6;
}
else if(month == 2)
{
monthTblVal = 2;
}
else
{
monthTblVal = iMonthStart[month];
}
}
else
{
monthTblVal = iMonthStart[month];
}
var iTotal = centuryForCalc + yearForCalc + year + monthTblVal + day;
var iDayIndex = iTotal%7;
var dayString = days[iDayIndex-1];
*********** CODE END **********