Hope this will help you..var begindate=Date2Num(xfa.resolveNode("SecB\.Date\.4"), "YYYY-MM-DD")var result=Num2Date(begindate+TotalDays, "YYYY-MM-DD")var WeekDay = Num2Date(result, "E")Then rest of the logic....WeekDay value must be 1,2,3,4,5,6,7ThanksVijay Reddy.M