5
Answers

Date Formatting

sdnaffi

sdnaffi

19y
2.6k
1
Hey I tried this, private void ReceiptDateFormat(object sender, ConvertEventArgs c) { try { DateTime dt = (DateTime)c.Value; c.Value = dt.ToString("dd/MM/yyyy"); } catch(Exception ex) { MessageBox.Show("Error #: " + ", " + ex.Message,Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } } This gives an error saying InvalidCastingException Solve this pls
Answers (5)