473,320 Members | 1,694 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,320 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 1447
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.