Daniel

Daniel

  • NA
  • 66
  • 0

Short date formatting...leading zeros

Aug 14 2007 2:15 PM
I have a masked textbox on a windows form and am trying to display a short date (01/01/2006) however the leading zeros on the day and month are getting removed and causing display problems.  The date coming back from the database is "1/1/2006".

My question is does .NET already have a built-in function to format the date correctly or do i need to build my own customer function to add the leading zeros?

If I need a custom function, can someone offer one up that can do the trick?

Thanks,

Daniel

Answers (1)