473,699 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

14 New Member
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
11 2341
willakawill
1,646 Top Contributor
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
Killer42
8,435 Recognized Expert Expert
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
jqtimbang
14 New Member
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
jqtimbang
14 New Member
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
Killer42
8,435 Recognized Expert Expert
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|Compone nts as "Microsoft Masked Edit Control".
Nov 16 '06 #6
sashi
1,754 Recognized Expert Top Contributor
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
Killer42
8,435 Recognized Expert Expert
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
jqtimbang
14 New Member
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
jqtimbang
14 New Member
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

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

Similar topics

8
9442
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $ Last-Modified: $Date: 2003/10/28 19:48:44 $ Author: A.M. Kuchling <amk@amk.ca> Status: Draft Type: Standards Track
3
3385
by: Alistair | last post by:
it's the idiot with his query strings again...."yippeee" I hear aaron shout this time the problem is with a date format query I have a query string thus strSQL = "SELECT * FROM users where creation_date >= #" & strthisweekstart & "# AND creation_date <= #" & strthisweekend & "#" strthisweek start is dateadd("d",-7,date) and strthisweekend is date(). The
1
60916
by: jt | last post by:
I posted this yesterday, but I am not seeing this out yet: I am having problems with updating a date field in a certain format. The data is stored in an Oracle database. The date is automatically displayed in format, "mm/dd/yyyy" on the ASP page, but it is accepted only in another format, "dd/mon/yy". I want to make it consistent. How can I force it to accept the date in format "mm/dd/yyyy"? The second option would be to force it to...
4
5384
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and calculate days, months, and years. This is not for a college course. It's for my own personal genealogy website. I'm stumped about the code. I'm working on it but not making much progress. Is there any free code available anywhere? I know it...
6
31172
by: Dario Di Bella | last post by:
Hi all, we have the following urgent issue affecting our development team. Initially we had one particular workstation that failed executing queries on a DB2 database, raising an invalid date format exception (SQLSTATE=22007). The same queries worked fine on all the other workstations. The date format we want to use is "dd/mm/yyyy".After reinstalling several times the db2 runtime client w/ different options, we found on a technical forum...
5
816
by: Macca | last post by:
Hi, I have a table which has a date/time field. I am storing them as follows :- 01/01/2005 11:25 01/01/2005 19:44 02/01/2005 05:04
12
29459
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as follows: function doDateCheckNow(source, args) { var oDate = document.getElementById(source.controltovalidate); // dd/mm/yyyy
9
12942
by: Alok yadav | last post by:
i am using a webservice in which a method is serach. i use this method which accept a argument of date type in dd/MM/yyyy formate. i have a textbox which accept the date from the user, when i convert textbox data into Datatime formate it converted into MM/dd/yyyy formate, but i have a requirement in dd/MM/yyyy formate. please help me, i am using c#.
17
5275
by: Petyr David | last post by:
Just looking for the simplest. right now my perl script returns an error messge to the user if the date string is invalid. would like to do this before accessing the server. TX
10
5811
by: ARC | last post by:
Hello all, General question for back-end database that has numerous date fields where the database will be used in regions that put the month first, and regions that do not. Should I save a date format in the table design, such as: mm/dd/yyyy? What I've done for years is to store the date format in date fields, then on the forms, based on their region, I would set the date formats on form_load
0
8705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8943
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8899
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7785
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4391
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3075
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2016
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.