 <p>Use <code>.ToString()</code>:</p> <pre><code>Year = int.Parse(bindingContext.ValueProvider.GetValue("Year").AttemptedValue ?? now.Year.ToString()); </code></pre> <p>Both variables need to be of the same type.</p>