Formatting grid view columns

J

John

Hi

I have a gridview bound to a sql server table. Two of the gridview columns
are bound to datetime fields. Is there a way to format one of those columns
to show only date part and the other column to show only time part?

Thanks

Regards
 
M

Munna

Hi

I have a gridview bound to a sql server table. Two of the gridview columns
are bound to datetime fields. Is there a way to format one of those columns
to show only date part and the other column to show only time part?

Thanks

Regards

Hi

For this you can solve the problem by setting DataFormatString of the
boundColumn
Go to gridviewtask
and select edit column
select the column you want to edit and navigate to DataFormatString
and set
{0:dd/MM/yyyy} to get the date part only

you can follow this thread for more info

http://forums.asp.net/p/1023473/2244968.aspx

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top