| | |
problem getting short time from an MS access database
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jun 2009
Posts: 20
Reputation:
Solved Threads: 0
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.......
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
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
Last edited by Traicey; Jun 19th, 2009 at 5:42 am.
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Use DefaultCellStyle.Format property.
I presume that the column number 3rd is of date datatype.
I presume that the column number 3rd is of date datatype.
C# Syntax (Toggle Plain Text)
dataGridView1.Columns[2].DefaultCellStyle.Format = "HH:mm:ss";
Failure is not fatal, but failure to change might be. - John Wooden
![]() |
Similar Threads
- Problem in Adding records to MS-Access Database (VB.NET)
- insert record into remote MS Access database in asp.net (ASP.NET)
- ASP.net c# - problem updating record in access database from a web form (C#)
- Problem inserting data into Access database via php (PHP)
- simultaneous MS Access Database access problem using VB6 program. (Visual Basic 4 / 5 / 6)
- JSP access to MS Database. (JSP)
- Problem with retrieving data from access 2003 (Visual Basic 4 / 5 / 6)
- Pls help me regarding to access database in vb6 (Visual Basic 4 / 5 / 6)
- Weird Problem: Short Freezing / Pauses (Windows NT / 2000 / XP)
Other Threads in the C# Forum
- Previous Thread: Statics and alot of confusion
- Next Thread: Export datagridview data to excel
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client combobox connection console control conversion csharp custom database datagrid datagridview dataset datetime degrees deployment developer development draganddrop drawing editing encryption enum event excel file form format forms function gdi+ hospitalmanagementinformationsystem httpwebrequest image imageprocessing index input install java label list listbox mandelbrot math mouseclick mysql operator oracle path photoshop picturebox pixelinversion post priviallages. programming radians regex remote remoting richtextbox rows serialization server sleep socket sql statistics stream string table temperature text textbox thread time timer txt update uploadatextfile usercontrol validation visualstudio webbrowser windows windowsformsapplication winforms wpf xml






