By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,644 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,644 IT Pros & Developers. It's quick & easy.

How to enter a date with format mm/dd/yyyy

P: 14
Hello! I'm a newbie in VB. Can someone please help me how to format my input date in mm/dd/yyyy? Example when I enter 11/16/2006 in the text box 11/16/020 will appear. Thank you.
Nov 16 '06 #1
Share this Question
Share on Google+
11 Replies


100+
P: 1,646
Hello! I'm a newbie in VB. Can someone please help me how to format my input date in mm/dd/yyyy? Example when I enter 11/16/2006 in the text box 11/16/020 will appear. Thank you.
Hi. Are you saying that this is what is happenning or this is what you want to happen?
Nov 16 '06 #2

Expert 5K+
P: 8,434
Hello! I'm a newbie in VB. Can someone please help me how to format my input date in mm/dd/yyyy? Example when I enter 11/16/2006 in the text box 11/16/020 will appear. Thank you.
How are you accepting the input? A textbox? Have you considered using a "masked textbox"? (I can't recall the official name of this control type.)
Nov 16 '06 #3

P: 14
Hi. Are you saying that this is what is happenning or this is what you want to happen?
Hi! its what I want to happen. activation date = mm/dd/yyyy . Thank you for a quick reply.
Nov 16 '06 #4

P: 14
How are you accepting the input? A textbox? Have you considered using a "masked textbox"? (I can't recall the official name of this control type.)
I'm accepting it in a textbox. Unfortuantely, i still don;t know how to masked it. Thanks.
Nov 16 '06 #5

Expert 5K+
P: 8,434
I'm accepting it in a textbox. Unfortuantely, i still don;t know how to masked it. Thanks.
Can you show us the code which moves the value from the textbox to the date/time variable, or whetever you're placing it in?

Also, I don't know whether it will be much use or not, but the control I was referring to can be found under Project|Components as "Microsoft Masked Edit Control".
Nov 16 '06 #6

sashi
Expert 100+
P: 1,754
I'm accepting it in a textbox. Unfortuantely, i still don;t know how to masked it. Thanks.
Hi there,

Why not make things alot more easier by using VB Masked Control, you can save alot of valuable time. Good luck & take care.
Nov 16 '06 #7

Expert 5K+
P: 8,434
Hi there,

Why not make things alot more easier by using VB Masked Control, you can save alot of valuable time. Good luck & take care.
Yes, it might be helpful. The datepicker control might be even better.

However, it sounds as though the real problem is not the input, but the conversion to a date value. That's why I asked to see the code.
Nov 16 '06 #8

P: 14
Yes, it might be helpful. The datepicker control might be even better.

However, it sounds as though the real problem is not the input, but the conversion to a date value. That's why I asked to see the code.
I tried the Masked and its works fine but i'm trying to fix my tab index now. i think it got mixed up. Btw, killer42 i don't have a code yet to input the date. What I have is the textbox labeled as txt_activedate with the datasource pointed to an access database.
Nov 16 '06 #9

P: 14
I tried the Masked and its works fine but i'm trying to fix my tab index now. i think it got mixed up. Btw, killer42 i don't have a code yet to input the date. What I have is the textbox labeled as txt_activedate with the datasource pointed to an access database.

Yehey!! maskEd Box is now working in my input date format... tab index was also fixed. Thanks everyone!! :0)
Nov 16 '06 #10

Expert 5K+
P: 8,434
I tried the Masked and its works fine but i'm trying to fix my tab index now. i think it got mixed up. Btw, killer42 i don't have a code yet to input the date. What I have is the textbox labeled as txt_activedate with the datasource pointed to an access database.
Cool!

Let us know if you need any more help.
Nov 16 '06 #11

P: 14
Cool!

Let us know if you need any more help.
Yes, i will definitely seek your help again.. you guys are so cool! that was quick i learned from you a lot... till next time.... Thanks very much :)
Nov 16 '06 #12

Post your reply

Sign in to post your reply or Sign up for a free account.