Connecting Tech Pros Worldwide Help | Site Map

Putting Just The Month In A Textbox or Day?

lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532
#1: May 20 '09
is it possible to get Just the month of the date in a textbox and Day and Year
another words if i had three textboxes and i wanted to put the month like ( MAY) in one and the day in the other one and the year (2009) could it be done? if so how can i do this on my form

lee123
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,497
#2: May 20 '09

re: Putting Just The Month In A Textbox or Day?


Why you need three text boxes.
You have to write all the validations for that.
You need to use DTPicker control .
lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532
#3: May 20 '09

re: Putting Just The Month In A Textbox or Day?


because i want to have it in the three separate boxes to go into a report

lee123
lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532
#4: May 21 '09

re: Putting Just The Month In A Textbox or Day?


is there a way to do this or not?
prabirchoudhury's Avatar
Familiar Sight
 
Join Date: May 2009
Location: Wellington, New Zealand
Posts: 152
#5: May 22 '09

re: Putting Just The Month In A Textbox or Day?


yes you can..so what is your problem to do separate text boxes for date? you could get three separate values and add as a date format if you needed or do whatever you need for your requirements
lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532
#6: May 22 '09

re: Putting Just The Month In A Textbox or Day?


i have figured it out. but thanks for responding...

lee123
Newbie
 
Join Date: Jul 2009
Posts: 1
#7: Jul 24 '09

re: Putting Just The Month In A Textbox or Day?


Quote:

Originally Posted by lee123 View Post

is it possible to get Just the month of the date in a textbox and Day and Year
another words if i had three textboxes and i wanted to put the month like ( MAY) in one and the day in the other one and the year (2009) could it be done? if so how can i do this on my form

lee123

how the create step by step crystal report in Vb6.0
CyberSoftHari's Avatar
Expert
 
Join Date: Sep 2007
Location: Banglore, India.
Posts: 450
#8: Jul 25 '09

re: Putting Just The Month In A Textbox or Day?


Quote:

Originally Posted by lee123 View Post

is it possible to get Just the month of the date in a textbox and Day and Year another words if i had three ...
lee123

You can use mask edit text control in a single text box then format it.
smartchap's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Lucknow, India
Posts: 194
#9: Jul 25 '09

re: Putting Just The Month In A Textbox or Day?


Simply use the following code in click event or any subroutine or as desired by you:

Expand|Select|Wrap|Line Numbers
  1.  
  2.     Text1.Text = Day(Now)
  3.     Text2.Text = Format(Month(Now), "mmmm")
  4.     Text3.Text = Year(Now)
  5.  
  6.  
Reply


Similar Visual Basic 4 / 5 / 6 bytes