Saturday, October 11, 2008

Repeater Control - How to get formatted date as ouput on a page having Repeater Control

If you are tired of getting dates in your repeater control as shown in the following figure

unformatted

and you want to get dates in some custom format then simply you can use the ToString() method with some parameters to convert it into desired format as shown below.

formattd

You just have to enter this small piece of code to achieve this

repeater

 

For further information on DateTime formats please visit this link

http://msdn.microsoft.com/en-us/library/az4se3k1.aspx

0 comments :

Post a Comment