Click here to Skip to main content
15,891,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi Friends,

In my code time date formate is like 4/24/2013 but actually i need like Apr 24 2013 .
Please give me idea how to change this formate.
Posted
Updated 25-Mar-13 1:19am
v2
Comments
Prakash Thirumoorthy 25-Mar-13 7:01am    
show ur coding...
Prasanna from Chennai 25-Mar-13 7:05am    
lstrArrDate = lstrArrDate.Split("T")(0).Split("-")(1) & "/" & lstrArrDate.Split("T")(0).Split("-")(2) & "/" & lstrArrDate.Split("T")(0).Split("-")(0)
Prakash Thirumoorthy 25-Mar-13 7:10am    
what is the value of lstrArrDate before executing this line?
Prasanna from Chennai 25-Mar-13 7:13am    
normal dateformate means 03122013 like this but i need here mentioned month name.
in 03122013 inthis 03 is month 12 is date 2013 year
Madhusudhan H N 25-Mar-13 7:19am    
Set the datetimepicker custom format property as MMM/dd/yyyy

You can use Format[^] function.
VB
Dim myDate As Date = Date.Now
Dim sDate As String = Format(myDate, "MMM dd yyyy")
Console.WriteLine(sDate)
 
Share this answer
 
Comments
Prasad_Kulkarni 25-Mar-13 7:18am    
5+!
Maciej Los 25-Mar-13 7:20am    
Thank you, Prasad ;)
Leo Chapiro 25-Mar-13 7:20am    
Another +5 for Maciej ;)
Maciej Los 25-Mar-13 7:24am    
Thank you, du[DE] ;)
Prasanna from Chennai 25-Mar-13 7:33am    
thanks All My Problem is solved.
Dim myDate As Date = Date.Now
Dim sDate As String = Format(myDate, "MMM dd yyyy")
Console.WriteLine(sDate)
i used this one.
Set the custom format property as MMM/dd/yyyy
 
Share this answer
 
v2
Console.WriteLine(Date.Now.ToString("MMM dd yyyy"))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900