Solved

ASP.NET / VB: Friendly Date Format

Posted on 2012-12-27
3
358 Views
Last Modified: 2012-12-27
Response.write(Request.Params("expire"))
This has a format like:
11/12/2015

I would like it to be like this:
November 12, 2015
0
Comment
Question by:hankknight
3 Comments
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 225 total points
ID: 38724766
Try

Response.write(DateTime.Parse(Request.Params("expire")).ToString("MMM yyyy"))


http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 225 total points
ID: 38724781
I think CodeCruiser's format should be this instead:

ToString("MMMM dd, yyyy")

Open in new window

0
 
LVL 16

Assisted Solution

by:Imran Javed Zia
Imran Javed Zia earned 50 total points
ID: 38724784
Hi,

You can use following code,
Just make sure that Request.Params("expire") contains valid date.

Response.Write(Convert.ToDateTime(Request.Params("expire"))).ToString("MMMM dd, yyyy"))

Thanks
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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