Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Grid veiw format a date so it shows the month name

Posted on 2006-06-30
4
Medium Priority
?
368 Views
Last Modified: 2008-03-17

Hi all,
I have a grid view which displays a date from a database. I have the date in the dd-mm-yyyy format by putting this code in the source of the aspx page:
DataFormatString="{0:dd-M-yyyy}" HtmlEncode="False"

Is there a format i can use to get the following:
2 March 2006

instead of 2/3/2006?

Cant find the right info on this as there so much on it!
Cheers
D
0
Comment
Question by:CoreSupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Accepted Solution

by:
DreamMaster earned 375 total points
ID: 17016454
How about changing the field to a Templatefield...like so:

<asp :TemplateField HeaderText=“CreationDate” >
   <edititemtemplate>
    <asp :Label ID=“Label1&#8243; runat=“server”
      Text=‘<%# Eval("CreationDate", "{0:dd-M-yyyy}") %>‘>
    </asp>
   </edititemtemplate>
   <itemtemplate>
    <asp :Label ID="Label1" runat="server"
      Text=’<%# Bind(“CreationDate”, “{0:dd-M-yyyy}”) %>‘>
    </asp>
   </itemtemplate>
  </asp>

Hope that helps,

Regards,
Max.
0
 

Author Comment

by:CoreSupport
ID: 17016551
Hey
havent done that before...
Can I call a method in the asp then and just work out what the month is based on the month id?
Cheer
d
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 17016723
You could do that..

Regards,
Max.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 17016858
Glad to have been helpfull.

Regards,
Max.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

609 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