A graduating student of the City College of New York wears a message on his cap during the College's commencement ceremony in the Harlem section of Manhattan.

Your resume should provide a chronological account of your education and work history, including the year you graduated from college — right? Wrong. It turns out that including your college graduation date could do more harm than good as you get older. Federal law prohibits discrimination in all aspects of employment for those 40 years of age and older. But the reality is that "age discrimination is still alive and well,” says Elaine Varelas, managing partner at career consulting firm Keystone Partners. When you include your graduation date, she tells CNBC Make It, you're giving the employer a sense of your age, which can actually hinder your chances of getting hired as you approach 50. If you choose to include your graduation year at all, which some career experts advise against doing, the general consensus is to remove this information between ages 40-50. You want the “focus to be on the skills that you provide and the value that you bring to their organization,” Varelas explains — not your age.

When to remove the date if you're older

Debra Wheatman, certified career coach and founder of Careers Done Write, says that not only should you remove your graduation date from your resume, you should also delete anything else that could provide a clear indication of your age. “Your resume is a marketing tool to help you get your foot in the door,” she tells CNBC Make It. Its sole purpose should be to highlight your past experience and why you’re the best fit for the company. As you advance in age, including your graduation date can be problematic if the hiring manager is younger than you are, which they often are, Wheatman says. If you do choose to include your graduation year, Wheatman says to remove this information once you’ve accumulated 10 to 15 years of work experience. That way, your resume centers around your accomplishments and proven track record, rather than your age.

Focus on relevance, says Dana Leavy-Detrick, founder of Brooklyn Resume Studio. Just as you wouldn’t include the job you had at an ice cream stand when you were 12, you shouldn’t include your graduation date once you have substantial work experience. Leavy-Detrick recommends removing your graduation date once you have five to 10 years of experience, especially if you’re applying to an industry that favors a younger workforce, like tech. “Your age could be a consideration when it comes to cultural fit,” she tells CNBC Make It. Laura Slawson, certified professional resume writer and owner of The Creative Advantage, agrees that including your graduation date is gratuitous, unless you're applying for an entry-level position. “You don’t want to appear old or like you’re not up-to-date, especially if you’re in your 40s and 50s,” she tells CNBC Make It.

Slawson suggests following these guidelines: • If you have more than 10 to 15 years of experience, put your education at the bottom of your resume without a graduation date. • If you have five to seven years of experience, put your education at the bottom of the resume with your graduation date. • If you’re a recent grad applying for an entry-level role, place your education at the top of your resume, with the graduation date and any relevant coursework that you took.

The date can also work against young people

It’s not just older applicants who may want to refrain from providing their graduation year. Varelas notes that employers can be hesitant about hiring young people because they’re worried that these applicants, particularly millennials and members of Gen-Z, won’t stay with the company for long. Providing your graduation date could also spell trouble when applying for jobs with managerial-sounding titles, says Leavy-Detrick. Since job titles are so fluid, she says, a 25-year-old could have all the requirements listed for a role that has the word "senior" in it. But if an employer sees that the applicant is just a few years out of school, they may discount the candidate because they appear too young for the position.

When it does make sense to include your graduation date

There are still some instances when it’s beneficial to include your graduation date, even if you have years of experience. Those who have recently obtained a continuing education degree, such as a masters or Ph.D., or received certification in some specialty program should include the graduation year. Providing this information is particularly useful in an industry like tech or HR, says Leavy-Detrick, because these fields are constantly changing and releasing new information. Including a recent graduation date also provides continuity on your resume, notes Leavy-Detrick, and demonstrates to an employer that you were pursuing advanced training during that employment gap. Most importantly, adds Slawson, it “shows the hiring manager that even though you’re older, you’re still learning.” Like this story? Subscribe to CNBC Make It on YouTube! Don't miss: