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

x
?
Solved

How would I change the date format {0:d} to display just the month?  I'm coding in Asp.net C#

Posted on 2014-02-23
2
Medium Priority
?
615 Views
Last Modified: 2014-02-23
How would I change this date format to show just the month?  BTW, this label is part of a listview control:
<asp:Label ID="dateLabel" runat="server" Text='<%# Eval("date", "{0:d}") %>' 
                            Font-Bold="True" />

Open in new window






Thanks
0
Comment
Question by:bmanmike39
[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
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39880759
Use "M" instead.

e.g.

<asp:Label ID="dateLabel" runat="server" Text='<%# Eval("date", "{0:M}") %>' 
                            Font-Bold="True" />

Open in new window


You can check the following site for more format specifiers:  http://blog.stevex.net/string-formatting-in-csharp/
0
 

Author Closing Comment

by:bmanmike39
ID: 39880802
Thanks!
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

636 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