Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey i am use date and time picker control and i want to only month "MMMM" in this format and i am using this code
C#
dtp_StartDate.Date = Today.ToString("MMMM")

pls give me solution
Posted
Updated 23-May-12 0:11am
v2

Go to the Datetime picker properties

and choose Format property then custom there write there "MMMM"
or

in Codebehind
VB
Datetimepicker1.Format = DateTimePickerFormat.Custom
           Datetimepicker1.Format = "MMM"
 
Share this answer
 
Try:
C#
TextBox2.Text = someDate.ToString("MMMM", CultureInfo.CreateSpecificCulture("en-US"));

Details for the defined format here: MSDN: Custom Date and Time Format Strings[^]
 
Share this answer
 
store date into array field and use split method.....
 
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