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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top