Access Date / Time Retrival Issue

Hello -

My issues lies with not getting the information, but getting too much! When I pull records from the access dB and use a repeater - it displays the date as "3/28/2005 12:00:00 AM". In the dB the "SubmitDate" field is marked as a Date / Time field with a defualt value of Date(). When I open the table, in the SubmitDate column i can only see "3/28/2005". Is it just hiding that "12:00:00" AM from me? Is the .aspx page putting it in there for no reason? Is there a way to get rid of this while still displaying the date correctly? ( i.e. I used the following code to display one records date, and it displayed it without that "12:00:00 AM" jiberish. ).

I am also having the exact same problem with the Time retrival. It is the same situation as listed above, except for the default value it is "Time()". When I put it into the repeater it gives the correct time and some funky date like "12/31/8098".

Anyone seen this before / know the fix?

Thanks!
Armon14Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ayha1999Connect With a Mentor Commented:
Hi,

go to html view of the page where your repeater exists and

'<%# DataBinder.Eval(Container, "DataItem.YourDateField", "{0:dd/MM/yyyy}") %>'

and change whatever format you want.

hope this helps.

ayha
0
 
imperial_p79Commented:
have the format specified for the column while displaying as "mm/dd/yyyy". that should solve the problem
0
 
Armon14Author Commented:
ayha -

You are the asp master! Thanks tons!
0
All Courses

From novice to tech pro — start learning today.