Thank you for your reply.
I have checked web services, which you have suggested, but it is not giving me data which I required.
I need timestart and timeend from mdl_user_enrolments table where timestart is the date on which student has taken the course and timeend is the date on which, student enrollment period will get over.
I have checked all web services given on https://docs.moodle.org/dev/Web_service_API_functions . I am surprised no web services return these data.