Date Time question

M

mark

Hello

I search SQL DB and display results to an APS.Net page using <asp:repeater
/>

One of the columns is a Date in the Database SmallDate .

When I display it the page it shows Date and Time. How can I get rid of Time
and have only date displayed.

All help is greatly appreciated.

Mark
 
E

Elton Wang

If you are using DataBinder.Eval method, you can pass third parameter,
format string:

DataBinder.Eval(Container.DataItem, "DateTime_field", "{0:MMM dd yyyy}")

HTH
 

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top