Truncate a date time field

A

Arturo

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.
 
D

Douglas J. Steele

Use the TimeValue function. (There's also a corresponding DateValue function
if all you want is the date)
 
J

Jeff Boyce

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...

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


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