I have a DataGrid View which is binding to the database and gets info from the MySql database like this.
MySqlCommand cmd3 = new MySqlCommand("SELECT * FROM owner_units WHERE unit_id =" + UNITID, conn);
MySqlDataAdapter adp2 = new MySqlDataAdapter(cmd3);
DataSet ds2 = new DataSet();
adp2.Fill(ds2, "LoadDataBinding2");
owner_unit.DataContext = ds2;
And I add the data from the Database into my DataGrid View like this.
<DataGrid HorizontalAlignment="Left" Name="owner_unit" ItemsSource="{Binding LoadDataBinding2}" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" Height="99" Margin="36,463,0,0" VerticalAlignment="Top" Width="420">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding id}" Header="OwnerID" Width="100" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding percent}" Header="Percentage" Width="100" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding register_date}" Header="sell date " Width="200" IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>
My problem is that my database column called register_date is in Miladi Date (2021/11/09) and I want to change it to Persian (Shamsi) date (18/08/1400).