Exactly as guide Daniel Norton says.
For discount prices, the same day for evening performances, one day before for matinees. More details at https://www.tdf.org/nyc/7/TKTS-ticket-booths
Same day
You can get matinee tickets the day before
You can only buy for the day you want to see!
I believe this is only for same day tickets.
Thanks! Your answer is awaiting moderation.