stevegarrington101@hotmail.com (Steve) wrote in message news:<ed6c27ab.0310200907.22e9cb9d@posting.google. com>...[color=blue]
> I am currently trying to validate data in an access database. I need
> to verify that columns containing date information are in the format
> ddmmyyyy and columns containg time information are in the format HH:MM
> 24. The dates and times are stored in text fields. ie date 12121998,
> time 20:34
>
> Could anyone suggest a method for validating the fields. What is the
> syntax for converting text fields into dates and times?
>
> Any suggestions welcomed. Thanks in advance[/color]
I'm almost afraid to ask this, but why not just store them as normal
date/time fields in Access and then use date math to convert them to
some other format by using a query? Seems like you're making work for
yourself by working against the way the database works. Only way of
validating the fields like that is to use a function in the
BeforeInsert event of your form and disallow adding records directly
to the table.
See CDate()and DateSerial().