Solved

ASP.NET / VB: Friendly Date Format

Posted on 2012-12-27
3
363 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
[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 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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 …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 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