Solved

Date & time validation

Posted on 2002-04-16
6
289 Views
Last Modified: 2008-03-17
hi!
 I am not really good in access at all, however i have a job to use an access database with delphi via ADO.

i was wondering, what exactly do i need in the validation text boks to check that we have typed in a date. and another box for time...

time() is no good... since it prints both time & date...


0
Comment
Question by:joepezt
6 Comments
 
LVL 57
ID: 6944721
It's not clear if your using Delphi just to look at the data, or are using Access for the programming.  If your using Access, you'd use the IsDate() function to return a logical to check for a valid date.

Jim.
0
 

Expert Comment

by:muzori
ID: 6944896
put in text box like this
=date()
0
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 6945263
If you use Delphi via ADO I suppose, or BDE, in both cases you must DoubleClic the TAdoTable, or Ttable and then right button of the mouse - Add all fields.

Now, if you has the little box with all the fields and the form tha you use to enter the data, select a Date or Time field and in the set the EditMask property for exaple !99/99/0000;1;_ for Date, or !90:00:00;1;_ for time.

Then you select  the fiedl and drag it and drop over the form. thats all.

Best Regards.
Marcos.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 2

Author Comment

by:joepezt
ID: 6947227
marocs: how do i put this in the validation rule in my access database?

date (!99/99/0000;1;_) ?
0
 
LVL 3

Accepted Solution

by:
marcoszorrilla earned 10 total points
ID: 6947396
Well if you wont to put this mask in Access.
you must select the field and set the properties like this form example.
Format:ShortDate ..... You select your desired format
InputMask:99/99/00;0;_ You have a list to choice

For Time is the Same, and the same properties to set.

Of Course first at all you select your table and the design mode.

Best Regards
Marcos.
0
 
LVL 2

Author Comment

by:joepezt
ID: 6947437
hehe, ok, I have been blind ;)
thanx =)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question