Solved

ASP.NET / VB: Friendly Date Format

Posted on 2012-12-27
3
348 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
Comment Utility
Try

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


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

Accepted Solution

by:
käµfm³d   👽 earned 225 total points
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now