Date/Time data type in Access

G

Guest

In the Access db, 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 the db, which
is fine since I don't want the time. Yet in a VB.NET program, where I display
the same data from the Access db, 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
--
 
R

Rick B

Sounds like you need to somehow mask it in the vb.net application.

A date/time field in Access DOES store a date and time, even if you only
enter a date.

Rick B
 
T

Tom Wickerath

Hi Tom,

When you are using VB.Net (or any other program to access a JET file), you are not using Access.
Access is simply a GUI (graphical user interface) for accessing data in a JET (.mdb) database.
Thus, your question is correctly stated as: "Yet in a VB.NET program, where I display the same
data from the JET db, 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?".

Date/Time formats set in Access are likely saved as Access properties, not a JET properties. I
suggest posting your question to the appropriate .NET group.

Tom
___________________________________


In the Access db, 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 the db, which
is fine since I don't want the time. Yet in a VB.NET program, where I display
the same data from the Access db, 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
--
 

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