sdnaffi

sdnaffi

  • NA
  • 12
  • 0

Date Formatting

Feb 17 2005 7:22 AM
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)