.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

date format in asp

Posted By: Catherine     Posted Date: June 07, 2011    Points:5   Category :C#
please tell code to get date format like this jan22

Responses
Author: Gowthammanju             
Posted Date: June 07, 2011     Points: 20   

hi

DateTime d=DateTime.parse("11/01/2005");


now you can specify the format by
d. ToString("dd/MM/yyyy")
d. ToString("dddd - d - MMMM")


or view this link for more details

http://www.csharp-examples.net/string-format-datetime/

hope it helps

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Sasi Prabhu             
Posted Date: June 07, 2011     Points: 20   

Refer :

http://programming.top54u.com/post/C-Function-to-Get-Current-DateTime.aspx


Thanks & Regards,
Sasi Prabhu.
Author: shiv chandra             
Posted Date: June 07, 2011     Points: 20   

Checkout this link of MSDN.
Surely your problem will be solved.
http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx#Y1663

Regards
Shiva
Author: Narayanan             
Posted Date: July 12, 2011     Points: 20   

Hi,
Try this
DateTime.Today.ToString("MMM-DD-yyyy")

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend