hi everybody, Now im doing one project.In that I have to insert the Date Of Birth field into the db table.For that, if anybody enter the DOB field,I have to check whether it is in the format of "DD/MM/YYYY" or not.I have written the code for that is If text1.text<>Format$(DD/MM/YYYY) Then
Msgbox"DOB Should Be The Format Of DD/MM/YYYY"
But it hasn't succeeded. So kindly reply me anyone quickly.
6 1147
Dear sreekandan,
i advice to use date fields in dd/MMM/yyyy format.....
because here lots of chance to make mistake in day and month positions
Dear sreekandan,
i advice to use date fields in dd/MMM/yyyy format.....
because here lots of chance to make mistake in day and month positions
i tried with that code.But i couldn't get the right output.So kindly anyone reply me.
i tried with that code.But i couldn't get the right output.So kindly anyone reply me.
One thing you could try is If Not IsDate(text1.text) Then...
Of course, one problem you may run across in such cases is people mixing up the month and the day. That's where using a non-numeric month can be useful. For example, 01/02/2003 is quite ambiguous, where "01 FEB 2003" is much harder to misinterpet.
Another option is to use something like a Calendar or DateTimePicker or Masked Edit control, which only allows the user to enter a valid format.
One thing you could try is If Not IsDate(text1.text) Then...
Of course, one problem you may run across in such cases is people mixing up the month and the day. That's where using a non-numeric month can be useful. For example, 01/02/2003 is quite ambiguous, where "01 FEB 2003" is much harder to misinterpet.
Another option is to use something like a Calendar or DateTimePicker or Masked Edit control, which only allows the user to enter a valid format.
thanks.I tried with that code.So i got the proper output that what am i thought.
One thing you could try is If Not IsDate(text1.text) Then...
Of course, one problem you may run across in such cases is people mixing up the month and the day. That's where using a non-numeric month can be useful. For example, 01/02/2003 is quite ambiguous, where "01 FEB 2003" is much harder to misinterpet.
Another option is to use something like a Calendar or DateTimePicker or Masked Edit control, which only allows the user to enter a valid format.
If i want the format of "MM/DD/YYYY"
Then, how can I write change the above code you have given?
If i want the format of "MM/DD/YYYY"
Then, how can I write change the above code you have given?
Better you give one lable at the top of the text1.Text with caption of the date format which you need then onely it will users friendly.... Ok
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Simon Brooke |
last post by:
I'm investigating a bug a customer has reported in our database
abstraction layer, and it's making me very unhappy.
Brief summary:
I have a database abstraction layer which is intended to...
|
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...
|
by: Cesar Ronchese |
last post by:
Hello All!
I have a .Net project that, in my machine, the dates are showed in this
format: dd/mm/yyyy. But, when I install the project in some customer
machines, the date is showed in this...
|
by: Lyn |
last post by:
Hi,
I am developing a project in which I am checking for records with
overlapping start/end dates. Record dates must not overlap date of birth,
date of death, be in the future, and must not...
|
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...
|
by: andreas |
last post by:
When I copy a vb.net project using date formats from one PC with a windows
date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I
get errors.
How can I change for a while in the...
|
by: Paulo |
last post by:
Hi, how can I return just the date from a DateTime field ? Any C# .net 2.0 /
SQL function?
Thanks a lot!
|
by: fniles |
last post by:
On my machine in the office I change the computer setting to English (UK) so
the date format is dd/mm/yyyy instead of mm/dd/yyyy for US.
This problem happens in either Access or SQL Server.
In the...
|
by: ollyb303 |
last post by:
Hello,
I am using a dynamic crosstab report to track performance statistics for my company and I have hit a problem.
I would like the option to track stats daily (for the last 7 complete...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |