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 / General 2 / May 2008

Tip: Looking for answers? Try searching our database.

Truncate a date time field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arturo - 14 May 2008 12:54 GMT
I have a view from Oracle that has a date time field. What I need most out of
this field is the time. I can use the date but really don' have to have it. I
have set the data type several different ways. It will display just the time
but the date is still there and interferes with my queries. My queries have
to identify the time specifically.

Here is the display (5/13/2008 3:06:49 AM). When I change the data type I
can get 3:06:49 AM. But this is only what is displayed. The date is still
there.

Is there a way to split this out so that at least I keep the time?

Thank you.
Douglas J. Steele - 14 May 2008 13:00 GMT
Use the TimeValue function. (There's also a corresponding DateValue function
if all you want is the date)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I have a view from Oracle that has a date time field. What I need most out
>of
[quoted text clipped - 13 lines]
>
> Thank you.
Arturo - 14 May 2008 13:29 GMT
Thanks. I searched for TimeValue Function and found a query that worked. Good
job!

> Use the TimeValue function. (There's also a corresponding DateValue function
> if all you want is the date)
[quoted text clipped - 16 lines]
> >
> > Thank you.
Jeff Boyce - 14 May 2008 13:12 GMT
Arturo

You may be making more work for yourself than you need to.

Keep the "raw" data that's coming from Oracle.  Use a query to get the
TimeValue() portion of the field.

Or if you don't need to "do math" on it, consider using the Format property
to display only the time portion...

Signature

Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

> I have a view from Oracle that has a date time field. What I need most out of
> this field is the time. I can use the date but really don' have to have it. I
[quoted text clipped - 9 lines]
>
> Thank you.
 
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.