Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Databinding DateTime fields

Reply
Thread Tools

Databinding DateTime fields

 
 
Alejandro Penate-Diaz
Guest
Posts: n/a
 
      02-18-2005
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 always 12:00:00 AM. How can I
remove this wrong time from my datagrid?
Thanks,
Alejandro.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hyaXMgUG9kbW9yZQ==?=
Guest
Posts: n/a
 
      02-18-2005
Within the column properties there is "Data Formatting Expression", try
setting it so something like {0:d} or {0:dd/MM/yyyy}

Hope this helps.
Chris.

"Alejandro Penate-Diaz" wrote:

> 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 always 12:00:00 AM. How can I
> remove this wrong time from my datagrid?
> Thanks,
> Alejandro.
>
>
>

 
Reply With Quote
 
 
 
 
Alejandro Penate-Diaz
Guest
Posts: n/a
 
      02-18-2005
it worked. thanks!

"Chris Podmore" <> wrote in message
news:F431EF22-46D6-4B89-8A2F-...
> Within the column properties there is "Data Formatting Expression", try
> setting it so something like {0:d} or {0:dd/MM/yyyy}
>
> Hope this helps.
> Chris.
>
> "Alejandro Penate-Diaz" wrote:
>
>> 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 always 12:00:00 AM. How can
>> I
>> remove this wrong time from my datagrid?
>> Thanks,
>> Alejandro.
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Re: [2.4.4] creating a datetime.datetime from an XML xs:dateTime skip@pobox.com Python 2 01-06-2009 01:31 PM
[2.4.4] creating a datetime.datetime from an XML xs:dateTime Martin Python 0 12-27-2008 08:08 PM
mx.DateTime to datetime.datetime mp Python 1 07-28-2006 10:57 PM
datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Christos TZOTZIOY Georgiou Python 3 09-13-2003 10:44 AM
RE: datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Tim Peters Python 0 09-09-2003 12:57 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57