Query date/time field access

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.
 
C

Curt_C [MVP]

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

Manish garg

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
 

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,774
Messages
2,569,596
Members
45,129
Latest member
FastBurnketo
Top