Ask a Question related to ASP.NET General, Design and Development.
-
Adil Bohoudi #1
show just the date in a datagrid column when the datafield is an datetime field
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
Adil Bohoudi Guest
-
Show Date only from DateTime in DataGrid
Hi, I am using the following code to display a datagrid on my page. Now one of the columns is of type DateTime(DataField="myDate"). Now when the... -
Get the datafield of a column in datagrid
How can I programmatically retrieve the name of the datafield of a datagrid column, while in the Datagrid1_UpdateCommand event. -
Formatting datagrid column to show boolean as Yes/no instead of truefalse
Is there a way to change the formatting expression of a column in the property builder of the datagrid to make boolean values appear as yes/no... -
Separated date and time or one datetime field
Hi all, I am learning php+mysql and am trying to set up a log database. I wonder if it is better to have 2 different columns for date and time... -
get week from date/datetime field
Hi, I have a very basic quesetion but I can't find any answer by myself. Is it possible to extract number of week from date/datetime column?... -
Eric Wise #2
Re: show just the date in a datagrid column when the datafield is an datetime field
Set your formatting expression to be {0:d}
"Adil Bohoudi" <adil_dev@hotmail.com> wrote in message
news:R86Ya.34454$FN3.2595642@news.ono.com...> 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
>
>
Eric Wise Guest



Reply With Quote

