Date/Time Data Type

G

Guest

In a JET db using ACCESS, I specify a field Data Type as Date/Time and the
Format as Short Date. These dates appear as 1/3/2003, 3/31/2003 ..... in
Access which is fine since I don't want the time. Yet in a VB.NET program,
where I display the same data from the JET db in a textbox, they appear as
1/3/2003 12:00:00 AM, 3/31/2003 12:00:00 AM ...... How do I get rid of the
time, 12:00:00 AM? I'm using Access 2003 and VB.NET 2002.
 
H

Herfried K. Wagner [MVP]

Tom said:
In a JET db using ACCESS, I specify a field Data Type as Date/Time and the
Format as Short Date. These dates appear as 1/3/2003, 3/31/2003 ..... in
Access which is fine since I don't want the time. Yet in a VB.NET program,
where I display the same data from the JET db in a textbox, they appear as
1/3/2003 12:00:00 AM, 3/31/2003 12:00:00 AM ...... How do I get rid of the
time, 12:00:00 AM?

Please post the code you are currently using to display the date in the
textbox.
 
G

Guest

When I just need the date I just format it with the desire format type.

myString = myDate.ToString("d")

The result is just the format that you are looking for, but it is now a
string.
 
G

Guest

That's a good question, to post the code used to display the date in the
textbox. I used the Data Form Wizard to display the data from a table in the
database.
 

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

Top