473,395 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DateTime field on DataGrid

Hi all
I have an Access Data Base containing a table which have a DateTime Field. I am creating a Windows App and I am using a DataGrid object to show data from the table using a DataSet object. My problem is that the column showing the DateTime field shows the data with the format dd/MM/yyyy but I want to show the format dd/MM/yyyy HH/mm
The Field on the DataBase is defined as DateTime with the format dd/MM/yyyy HH:mm. Also I have created the DataSet by code
Please, could anyone let me know how can I change the format of column on a DataGrid (programmatically)?
Many Thanks
Marcos
Jul 21 '05 #1
2 1449
Cor
Hi Marcos,

Some links mostly people find it there.

Faqs
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

http://www.microsoft.com/belux/nl/ms.../datagrid.mspx

http://msdn.microsoft.com/library/de...stDataGrid.asp

http://msdn.microsoft.com/library/de...ormattopic.asp

I hope this helps a little bit?

Cor
I have an Access Data Base containing a table which have a DateTime Field. I am creating a Windows App and I am using a DataGrid object to show data
from the table using a DataSet object. My problem is that the column showing
the DateTime field shows the data with the format dd/MM/yyyy but I want to
show the format dd/MM/yyyy HH/mm. The Field on the DataBase is defined as DateTime with the format dd/MM/yyyy HH:mm. Also I have created the DataSet by code. Please, could anyone let me know how can I change the format of column on a DataGrid (programmatically)?. Many Thanks.
Marcos

Jul 21 '05 #2
Hi Marcos,

Check out Binding.Format event in .net help files.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Marcos Rodríguez" <ar******@hotmail.com> wrote in message
news:32**********************************@microsof t.com...
Hi all,
I have an Access Data Base containing a table which have a DateTime Field. I am creating a Windows App and I am using a DataGrid object to show data
from the table using a DataSet object. My problem is that the column showing
the DateTime field shows the data with the format dd/MM/yyyy but I want to
show the format dd/MM/yyyy HH/mm. The Field on the DataBase is defined as DateTime with the format dd/MM/yyyy HH:mm. Also I have created the DataSet by code. Please, could anyone let me know how can I change the format of column on a DataGrid (programmatically)?. Many Thanks.
Marcos

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: v0lcan0 | last post by:
Any help on extracting the time part from the datetime field in SQL database. even though i had entered only the time part in the database when i extract the field it gives me only the date...
1
by: web1110 | last post by:
I have a table with a field of type datetime. I am displaying this table in a datagrid. My problem is that the datetime field shows only the date and not the time. I'd appreciate some help. ...
3
by: Andrew S. Giles | last post by:
Hello, I am importing a flat text file, and putting it into a datagrid for display on a form. Currently the users have their dates and times seperated. I have two fields, therefore in the...
1
by: Adil Bohoudi | last post by:
Hi all, i'm using a datagrid to show somedata retrieved from an sql-server 2000. this datagrid contains two columns a startdate and an enddate column. i used a storedprocedure to get both...
2
by: Chris | last post by:
Is there a way to truncate the Sql Server datetime field when displaying in a datagrid? I get the date and time, I only want date displayed. It's a bound column: <asp:BoundColumn...
2
by: Alejandro Penate-Diaz | last post by:
Hi. I am binding a datagrid to a sql table that has a DateTime field, this DateTIme field only has information about date and not about time, but my datagrid shows date and time and the time is...
5
by: ad | last post by:
I have a tabls of SQL 2000, about the data of student. The data is migrate from another databse, There is a field called birthday, it stores the data with the formate like: 1994/11/03 AM 02:09:00...
2
by: Marcos Rodríguez | last post by:
Hi all I have an Access Data Base containing a table which have a DateTime Field. I am creating a Windows App and I am using a DataGrid object to show data from the table using a DataSet object. My...
6
by: Marcin Wiszowaty | last post by:
Hello, I am reading into a dataset through a dataadapter. All drag+drop implementation. I have a field in the db that is a datetime(8). whenever i readin this field the datagrid displays the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.