Query date/time field access

  • Thread starter Thread starter Rolf
  • Start date Start date
R

Rolf

Hi all,

I Have a web page wich displays some data from an access DB using the
Datalist control. I have 1 problem with a field of the type Data/Time.

When I display the field using <%# Container.dataitem("Date")%> I'll see
this as a result "01/07/2005 0:00:00".. So it add's 0:00:00 is there
someway I can prevent this from happening with altering my DB

thks,

R.
 
You will have to either format it prior to the binding or use a conversion,
like .DateTime()
 
Hi all

If you are facing this problem you can use replace and convert function to
avoid this. here is the example

select replace((convert(char(10),getdate(),101)),'01/01/1900','') as date
from authors

thanks
manish
 
Back
Top