Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / March 2006

Tip: Looking for answers? Try searching our database.

Query Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
boese.c@maplan.com - 29 Mar 2006 23:14 GMT
I have a a table in access that a column has the data :2006-03-03
00:45:09.000, it is a time stamp that just keeps changing. My question
is how would I query just on the hour. So I could query on 00:45 and
00:46.  

Thanks
Chad
John Vinson - 30 Mar 2006 01:38 GMT
>I have a a table in access that a column has the data :2006-03-03
>00:45:09.000, it is a time stamp that just keeps changing. My question
[quoted text clipped - 3 lines]
>Thanks
>Chad

What's the datatype of this field? Is it in a native Access table or a
linked table of some sort? Access Date/Time values do not have
millisecond precision (only to the nearest second) nor do they have
colons, so I'm guessing it's Text.

Try using a calculated field:

TheHour: Hour(CDate(Mid([timestamp], 2, 19)))

Mid will extract the date/time portion; CDate will convert this to a
date/time; Hour will extract just the hour portion thereof.

                 John W. Vinson[MVP]    
boese.c@maplan.com - 31 Mar 2006 15:52 GMT
Do this in Query??

Thanks
Chad
John Vinson - 31 Mar 2006 18:14 GMT
>Do this in Query??
>
>Thanks
>Chad

Yes. Put the calculated field expression in a vacant Field cell in the
query grid.

                 John W. Vinson[MVP]    
boese.c@maplan.com - 31 Mar 2006 15:52 GMT
Do this in Query??

Thanks
Chad
boese.c@maplan.com - 31 Mar 2006 15:56 GMT
I might add it is a text field that is labeled CreationTimeStamp
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.