Código PHP:
$entity = new SchoolRecord();
$form = $this->createCreateForm($entity);
$form->handleRequest($request);
$em = $this->getDoctrine()->getManager("admission");
$applicantObject = $em->getRepository('ABCAdmissionBundle:Applicant')->find($appId);
$entity->setApplicant($applicantObject);
$app=$entity->getApplicant();
$fromDate=$entity->getFromDate();
$entity->setFromDate($fromDate->format("M-Y"));
$toDate=$entity->getToDate();
$entity->setToDate($toDate->format("M-Y"));