We need to format date values in our application often. We can format date value as shown below.
The output for the above two methods will be shown as follows.
16-Jun-2009
16-Jun-2009
We can even format a date value retrieved from database in the above method.
We can format the datetime value either module specific or page specific or application specific method using Globalization.
The output for the above 3 methods are as follows…
16-06-2009
16 June 2009
16-06-2009 15:24:42
We can apply a specific culture for globalization in module level as shown above, or in page level in page declaration or in web.config file as shown below in
You may also like to read |