Format date in a grid view from yyyymmdd to dd/mm/yyyy

Posted on 2006-04-27
Medium Priority
Last Modified: 2008-01-09
I have a dataset where the date is stored as yyyymmdd and would like this displayed as dd/mm/yyyy in the grid view.  Can this be achieve via formatting in the gridview or will I have to cast the data at source (data coming from an AS400 DB2 datable)

Language = C#, IDE = Visual Studio 2005, .NET = 2
Question by:rentonc

Accepted Solution

daniel_balla earned 225 total points
ID: 16551689
Hi rentonc,
best would be if you would cast the data at the source and then in the gridview you would set the format to {0:dd/MM/yyyy}

LVL 20

Assisted Solution

REA_ANDREW earned 150 total points
ID: 16551904
Yeh so in the GridView Bound Field Tag it should have this in also


for reference the C# Code Behind Method of this is Simply


Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question