Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi.

 

I use a datagrid to present my info from my db. In my db (Access) I have a filed name RegDate (datatype Date/time). I use this SQL to get the date.

"SELECT RegDate As Registration FROM tblMembers"

 

The I present the info from db into the datagrid. But The date is formated like this:

 

2003-09-15 00:00:00

 

But in the database the date is this: 2003-09-15...

 

Why does the datagrid add 00:00:00 (it just zeroes)???

 

Plz...help me...

 

//Andi

Posted

PMJI, it is preferable to jump in rather than starting a new thread with an identical question. Yes, I can see the local help file, but the problem comes at an earlier point in the design. Perhaps the original question also come from this angle.

 

I've created a datagrid at design time, and now I need to specify something like:

 

- the format for column 2 is "dd-MMM-yyyy HH:mm:ss"

- the format for column 7 is "dd-MM-yy"

 

The point is not whether the formats above are correct, or whether I identify a column by name or by number. From VB6 practice, I've expected a Columns collection hanging off the datagrid or the OleDbAdapter. Could not find such thing.

 

How do I access properties for individual columns in a datagrid ?

 

Andrew

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...