I am getting data from a SQL Server 7 table and binding it to a grid.
I have a field that is supposed to represent a date, and two fields
that are supposed to represent time.

When I look at the grid the date value is just the date (because I
guess I didn't enter a time, but just a date), but the time value only
displays the date and not the time, but when I look at that column in
the Admin it shows that data there with today's date (date I entered
the time value).

What am I missing here? I just want the time value to be displayed and
kept in the time column, and the date to be the only value in the date
column.

Do I have to do formatting commands on my Select statement to load the
data, and on my update and insert statements? I haven't tried that
yet, I'm hoping I don't have to, that seems excessive. I'm used to
just date, just time, or datetime. Anyway, thanks for any replies in
advance.

Thad

Re: DateTime data displaying by W

W
Thu Sep 30 15:11:22 CDT 2004

You can set a DataGridTableStyle then format the columsn via the
DataGridColumnStyles. If you need to do it with Textboxes or other controls
you can use the Format Event and the Parse event.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsBindingClassFormatTopic.asp

HTH,

Bill
"Thad" <thollingsworth@kinexisdms.com> wrote in message
news:b1f3c88e.0409301202.32c611ee@posting.google.com...
> I am getting data from a SQL Server 7 table and binding it to a grid.
> I have a field that is supposed to represent a date, and two fields
> that are supposed to represent time.
>
> When I look at the grid the date value is just the date (because I
> guess I didn't enter a time, but just a date), but the time value only
> displays the date and not the time, but when I look at that column in
> the Admin it shows that data there with today's date (date I entered
> the time value).
>
> What am I missing here? I just want the time value to be displayed and
> kept in the time column, and the date to be the only value in the date
> column.
>
> Do I have to do formatting commands on my Select statement to load the
> data, and on my update and insert statements? I haven't tried that
> yet, I'm hoping I don't have to, that seems excessive. I'm used to
> just date, just time, or datetime. Anyway, thanks for any replies in
> advance.
>
> Thad