Using the period info dat
The period_info DAT can be used to extract student-specific schedule data in an export or report. In this example, we had a selection of kids with birthdays coming up in the next week (derived through a custom report), and we wanted to know the room number of their assigned class in period 2. We did a quick export of their ID, name, and DOB, plus a DAT for "get room number of period 2 on Mondays through Fridays":
^(*period_info;2(M-F);room)
Here it is in context:
The specifics would of course need to be modified for different schools' schedules -- i.e. not all schools necessarily use the same abbreviations for days of the week, your "period 3" may actually be period 5 because of snack and homeroom, etc. So you might have to do some trial and error to get it right.
The KB article on the use of that DAT is attached here, along with the whole DAT supplement article. There's more it can do (teacher's name, course name, etc.) and there are other useful DATs to make reports and exports more dynamic.