Hi
Every one.
I have an MS access database table in which i have stored a data type of date/time in short time format.
When i access the table from c# and diplay it into a data grid view the column in short time format diplay as long time format
i.e, i have stored (10:10) in data base table but in c# it display like (16/06/2009.10:10:00 AM) in data gridview
how i can get the only short time from this table?
Please any one to help me.......

I think you might wana consider having something like this txtDate.Text = DateTime.Today.ToShortTimeString();
in ur code, its hard to tell coz u havent post any code to see where u might be going wrong

the code above will display in a text box "12:00 AM", u can also omit AM if u want to

Use DefaultCellStyle.Format property.
I presume that the column number 3rd is of date datatype.

dataGridView1.Columns[2].DefaultCellStyle.Format = "HH:mm:ss";

Thank You very much that was the exact solution of my problem
once again thank you

Thanks.
Please mark this Thread as Solved If you got suitable solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.