Hi
BO5, Oracle 8.0
All this prompts me to ask:-
How can I get the date to display as MM/YYYY in list of values but still behave as a date in comparisons etc.
Jonathan Bliss, Product Consultant
McKessonHBOC Computer Centre, Harold Wood Hospital site, Gubbins Lane, Romford, RM3 0NE
mobile:0498 668084, tel 01708 336135 (direct line with voicemail), fax 01708 376270
In a message dated 00-01-26 06:58:11 EST, you write:
So Walter, do you or anyone else know a way to get rid of
the
hh:mm:ss AM and still use the object as a date-field with format
dd-mm-yyyy.
We use BO 5.01 en Net 8.
Regards,
Robert Duindam
Simple: use trunc(date-field).
The command trunc() returns the date value as a date without any time
element. Well, that’s not exactly true. A date field in Oracle always has a
time element. The trunc() command simply sets the time value to midnight.
That way for any comparison (equal, between, greater than, etc.) you don’t
have to worry about time values getting in the way.
Caveat: using any function on an indexed value will cause that index to be
ignored. So if you have an index on date_field, and try the following query:
select whatever
from wherever
where trunc(my_date) = trunc(sysdate)
any index on foo_date will not help.
Regards,
Dave Rathbun
Integra Solutions
www.islink.com
Listserv Archives (BOB member since 2002-06-25)