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
Solved

ASP.NET / VB: Friendly Date Format

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net and creating a class 5 20
Looping through datagridview and dataset ? 6 24
Easy filter aspnet 2 24
How can I do Unit Testing with Session ? 1 10
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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