Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 11, 2012 12:50 PM by shiva.ram24
Member
50 Points
115 Posts
Nov 17, 2011 02:31 AM|LINK
Console.WriteLine(date1.ToString("D", CultureInfo.CreateSpecificCulture("en-US")))
' Displays Thursday, April 10, 2008
how to remove day and month only appear 3 characters become "Apr 10, 2008"
Participant
1288 Points
254 Posts
Nov 17, 2011 04:08 AM|LINK
Hello,
Try the below solution
date1.ToString("MMM d, yyyy", CultureInfo.CreateSpecificCulture("en-US"))
315 Points
140 Posts
Dec 15, 2011 05:35 AM|LINK
you can do this using SubString
615 Points
163 Posts
Jan 11, 2012 12:50 PM|LINK
.ToString("MMM dd, yyyy");
here MMM indicates Month like Apr,Mar,Nov etc
dd-->> for date like 01, 20, 25 etc.
all the best!
Lye
Member
50 Points
115 Posts
date format problem
Nov 17, 2011 02:31 AM|LINK
Console.WriteLine(date1.ToString("D", CultureInfo.CreateSpecificCulture("en-US")))' Displays Thursday, April 10, 2008how to remove day and month only appear 3 characters become "Apr 10, 2008"chiragvidani
Participant
1288 Points
254 Posts
Re: date format problem
Nov 17, 2011 04:08 AM|LINK
Hello,
Try the below solution
date1.ToString("MMM d, yyyy", CultureInfo.CreateSpecificCulture("en-US"))Chirag Vidani | My Blog
MCTS - .Net Framework 4.0, Web Applications
"…Mark As Answer" if my reply is helpful to you…”
Abhijit Gokh...
Member
315 Points
140 Posts
Re: date format problem
Dec 15, 2011 05:35 AM|LINK
you can do this using SubString
shiva.ram24
Member
615 Points
163 Posts
Re: date format problem
Jan 11, 2012 12:50 PM|LINK
.ToString("MMM dd, yyyy");
here MMM indicates Month like Apr,Mar,Nov etc
dd-->> for date like 01, 20, 25 etc.
all the best!