Can't get rid of the time part of a date

  • Thread starter Thread starter Jim in Arizona
  • Start date Start date
J

Jim in Arizona

I have a simple query that queries an access database. One of the fields is
date/time.

I use this to extract the date from the field in access:
CDate(objDataReader("date")).ToString

When the webform is viewed, date and time both show up. (eg. 12/12/2005
12:00:00 AM) How do I get rid of the time?

I've also tried CDate(objDataReader("date")).Date.ToString

Is it the CDate function? Should I not be using that?

TIA,
Jim
 
Karl Seguin said:
It's ToShortDateTime() or something :)

Karl

CDate(objDataReader("date")).ToShortDateString

That was it, Karl.

Thanks,
Jim
 

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

Back
Top