susan Posted April 8, 2002 Posted April 8, 2002 I have a report card solution for an elementary school, and a two-part question... Part 1: Given the fact that a school year starts and ends in two different calendar years and I know Date(Today), how do I represent SchoolYear? Part 2: (maybe a variation of part 1) If I know a student's Graduation Year and Date(Today), how do I calculate SchoolYear and therefore the student's current grade in school? Thanks. Susan
Fitch Posted April 8, 2002 Posted April 8, 2002 Seems like the simplest way would be 2 fields: SchoolStart and SchoolEnd. These could be global fields, but you'd have to be careful in a multi-user setting. In that case you might need to store them in a related file... Anyway. 1. The school year would be (text): Year(SchoolStart) & "-" & Year(SchoolEnd) 1b. To see if today is between the start and end dates; returns a 1(true) or 0(false): (Status(CurrentDate) SchoolStart) and (Status(CurrentDate) SchoolEnd) 2. GraduationYear - Year(SchoolEnd) So. If you don't like the idea of using simple date fields for SchoolStart and SchoolEnd, I suppose you could calculate them something like this (this calculates the year, not the date -- if you're going to hard-code the date in there anyway, then this all seems rather "academic"): SchoolStart: Case(Month(Status(CurrentDate)) 9, Year Status(CurrentDate), Year Status(CurrentDate) - 1) SchoolEnd: Case(Month(Status(CurrentDate)) 6, Year Status(CurrentDate), Year Status(CurrentDate) + 1)
Recommended Posts
This topic is 8336 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now