?
Solved

Assign date format mmmm d, yyyy in code

Posted on 2008-01-26
1
Medium Priority
?
1,004 Views
Last Modified: 2013-11-26
The AJAX CalendarExtender places January 17, 2008 in the test box on the screen using
Format="MMMM d, yyyy"  in at aspx file
I use ToLongDateString in the .vb file and get
I need Friday, January 18, 2008
What date format do I use to get the format January 17, 2008?
Thanks
0
Comment
Question by:expertsexchangehunter
1 Comment
 
LVL 22

Accepted Solution

by:
JimBrandley earned 2000 total points
ID: 20751605
You just supply the format to the ToString() metod of the DateTime object you are working with as:
formatString = "MMMM d, yyyy"
formattedDate = myDateTime.ToString( formatString);

"dddd, MMMM d, yyyy" ==> Friday, January 18, 2008
"MMMM d, yyyy"           ==> January 18, 2008

Jim
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
SingleRun is a tool that ensures that only one instance of an application is started, running it again brings the application to focus.
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…

601 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