Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > show just the date in a datagrid column when the datafield is an datetime field

Reply
Thread Tools

show just the date in a datagrid column when the datafield is an datetime field

 
 
Adil Bohoudi
Guest
Posts: n/a
 
      08-06-2003
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 dates. but when i use the following
code:

datagrid.datasource = selDates()
datagrid.bind()

both columns show the retrived datetime value. it's a little bit ugly to
see.......... the only thing i need is just the date value....

does someone know how to show only the datepart in a datagrid column

thanks in advance,

Adil


 
Reply With Quote
 
 
 
 
Eric Wise
Guest
Posts: n/a
 
      08-06-2003
Set your formatting expression to be {0:d}
"Adil Bohoudi" <(E-Mail Removed)> wrote in message
news:R86Ya.34454$(E-Mail Removed)...
> 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 dates. but when i use the following
> code:
>
> datagrid.datasource = selDates()
> datagrid.bind()
>
> both columns show the retrived datetime value. it's a little bit ugly to
> see.......... the only thing i need is just the date value....
>
> does someone know how to show only the datepart in a datagrid column
>
> thanks in advance,
>
> Adil
>
>



 
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
[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
Get the datafield of a column in datagrid et ASP .Net Datagrid Control 3 01-02-2005 08:41 AM
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