The coding should be on view page of mvc 5 application assuming that viewbag.DOB has value in string 01/01/1991