Formview Question about Dates and Formatting

  • Thread starter Thread starter David Hearn
  • Start date Start date
D

David Hearn

I have a formview control in my project (VS2005/ASP.NET 2.0) and I have one
field that is a date. I have it formatting correctly as a short date
(MM/dd/yyyy) but when I click the edit link to edit the record, it is
showing the long date/time format. How do I force the thing to only show
short date format while in edit mode also?

Thanks in advance!
 
You might want to format the date in the EditTemplate as well if you are
using Bind it should be <%#Bind("PropertyName","{0:MM/dd/yyyy}")%> or with
Eval <%#Eval("PropertyName","{0:MM/dd/yyyy}")%>
 
That worked! Thanks!


Onwuka Emeka said:
You might want to format the date in the EditTemplate as well if you are
using Bind it should be <%#Bind("PropertyName","{0:MM/dd/yyyy}")%> or with
Eval <%#Eval("PropertyName","{0:MM/dd/yyyy}")%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

GridView and FormView 1
formview edit issue 12
Date format 3
FormView disappears 2
FormView 3
Formview template insert to edit mode 1
FormView Buttons 1
FormView > Edit 1

Back
Top