Upvote:4
Your visa must be valid for the duration of your stay. You may stay only until the expiration date, when you must leave by the end of the day.
This is explicit in the Schengen Visa Code:
The date of the last day of the period of the visa holderβs authorised stay is entered after the word βTOβ and is written in the same way as the first date. The visa holder must have left the territory for which the visa is valid by midnight on that date.