Solved

Date & time validation

Posted on 2002-04-16
6
288 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…

772 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