Text to time conversion

G

glen

How do i convert a text string to a time format.
ie. 3:15pm or 8:13am to a time format that i can run querries with a
criteria of anything later than 3PM?
 
J

John W. Vinson

How do i convert a text string to a time format.
ie. 3:15pm or 8:13am to a time format that i can run querries with a
criteria of anything later than 3PM?

CDate() will do it. Access Date/Time values are stored as numbers, a count of
days and fractions of days (times) since an arbitrary start point; so 3pm is
actually stored as 0.625 and is equivalent to #12/30/1899 15:00:00#.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
G

glen

CDate() will do it. Access Date/Time values are stored as numbers, a count of
days and fractions of days (times) since an arbitrary start point; so 3pmis
actually stored as 0.625 and is equivalent to #12/30/1899 15:00:00#.
--

             John W. Vinson [MVP]
 Microsoft's replacements for these newsgroups:
 http://social.msdn.microsoft.com/Forums/en-US/accessdev/
 http://social.answers.microsoft.com/Forums/en-US/addbuz/
 and see alsohttp://www.utteraccess.com

Thanks John, that worked just fine.
 
G

glen

CDate() will do it. Access Date/Time values are stored as numbers, a count of
days and fractions of days (times) since an arbitrary start point; so 3pmis
actually stored as 0.625 and is equivalent to #12/30/1899 15:00:00#.
--

             John W. Vinson [MVP]
 Microsoft's replacements for these newsgroups:
 http://social.msdn.microsoft.com/Forums/en-US/accessdev/
 http://social.answers.microsoft.com/Forums/en-US/addbuz/
 and see alsohttp://www.utteraccess.com

Thanks John, that worked just fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top