Most items you find in print or in the library's online databases will have a date. But when you are using material from websites, there may not be one. If you searched, and there definitely is no date, just leave it out. From the MLA Style Center's Ask the MLA:
Q. The work I’m citing doesn’t have a publication date or page numbers. Should I include the abbreviations n.d. (“no date”) and n. pag. (“no pagination”) in the works-cited-list entry?
A. No. Do not use placeholders for unknown information like n.d. (“no date”) and n. pag. (“no pagination”) unless your teacher asks you to do so.
Source: The Work I’m Citing Doesn’t have a Publication Date Or Page Numbers. Modern Language Association of America, 2016, https://style.mla.org/placeholders/.
NOTE: This has changed from older editions of the MLA Handbook. For missing dates in APA Style, 6th & 7th editions, which have a different rule, see the link below.