PC Review


Reply
Thread Tools Rate Thread

DateTime field on DataGrid

 
 
=?Utf-8?B?TWFyY29zIFJvZHLDrWd1ZXo=?=
Guest
Posts: n/a
 
      22nd Feb 2004
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
 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      22nd Feb 2004
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



 
Reply With Quote
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      22nd Feb 2004
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" <(E-Mail Removed)> wrote in message
news:3290DA24-552B-4A73-80D8-(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNANSWERED: how to insert a null value in a datagrid datetime field Tim Mackey Microsoft Dot NET Framework Forms 6 24th Mar 2005 06:06 PM
datagrid and datetime field =?Utf-8?B?Q2hyaXM=?= Microsoft ASP .NET 2 11th Feb 2005 12:25 AM
changing a datetime field to just a date field in an access table =?Utf-8?B?amFpbWVlMDAx?= Microsoft Access 1 20th Jan 2005 08:48 PM
DateTime - Datagrid Paul Say Microsoft ASP .NET 3 8th Apr 2004 04:57 PM
show just the date in a datagrid column when the datafield is an datetime field Adil Bohoudi Microsoft ASP .NET 1 6th Aug 2003 05:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:56 AM.