|
-
Jan 17th, 2007, 10:20 PM
#1
Thread Starter
Junior Member
separate date character
i enter date in textbox in format :26/12/2006
i just want get the month n year value:
how to separated it
-
Jan 17th, 2007, 10:32 PM
#2
Re: separate date character
You should use a DateTimePicker, not a TextBox. The you can get a Date object from its Value property, then get the Month and Year properties from that.
-
Jan 17th, 2007, 10:36 PM
#3
Re: separate date character
If you still insist on using a textbox (which is a very bad idea), you can use either Date.Parse or Date.TryParse (which is more prefered) to parse the string in the textbox to a Date object, then the month from its Month property as JMC said.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|