I want to format year to this format yy = 17 i tried with this code but not working it is wrong format .
<select id="CreditCardExpiryDateYear" class="dropdown form-control">
@for (var iYear = DateTime.Now.Year; iYear <= DateTime.Now.Year + 10; iYear++)
{
<option value="@iYear.ToString("yy")" @(DateTime.Now.Year == iYear ? " selected" : "")>@iYear.ToString("yy")</option>
}
</select>