The visa is based on the interview date, but as @S2N stated, the LPR status, conditional or regular, is based on the date of admission (start of LPR status). If you are close to the 2 year mark on your marriage, wait to enter on the spousal visa after the second wedding anniversary, and you will be entitled to a 10 yr GC regardless as to the class printed on the visa. Yes, CBP may not catch it, so you can politely let them know, but even if for some reason the GC comes with only 2 yr validity, you can file an I90 for free to correct USCIS’s error.
So I will stress again, @Crazy Cat can also emphasize, if you are near your second wedding anniversary, and the visa will remain valid until after that wedding anniversary, do everything you can to enter the U.S. after that second wedding anniversary date.
Good Luck!