title: How to convert Gregorian date (date picker) to Shamsi?
body: <p>I use a date picker as an input for selected date. I want to convert the selected date into its equivalent Shamsi (persian) date. I tried this code:</p>
  <pre><code>private void button2_Click(object sender, EventArgs e)
      {
          string[] Gregorian = Convert.ToString(dateTimePicker1.Value.ToShortDateString()).Split('/');
          PersianCalendar persian = new PersianCalendar();
          label4.Text = string.Format(&quot;{0}/{1}/{2}&quot;, persian.GetYear(Convert.ToInt32(Gregorian[2]), persian.GetMonth(Convert.ToInt32(Gregorian[0]), persian.GetDayOfMonth(Convert.ToInt32(Gregorian[1])));
      }
  </code></pre>
  <p>But it has red underline in <code>Convert.ToInt32(Gregorian[1])</code> section. The IDE says &quot;cannot convert from 'int' to 'system.DateTime'.
  Please help me.</p>