Re: Is there an HOUR function?
Posted in 1995
Mariusz D — — source: Informix-list mailing list archive (1991-1998)
Dean Peddle (dpeddle@nlnet.nf.ca) wrote:
: Hi all:
: I would like to be able to have an HOUR function that works on DATETIME
: variables inthe same way that MONTH/DAY/YEAR does. For example:
: SELECT * FROM mytable WHERE HOUR(mydate) = 10
: Any suggestions on something that will provide similar capability? I'm
: not looking for a programming solution - must be able to be done relatively
: simply as an interactive SQL query
select * from a_table where EXTEND(a_datetime_field, HOUR TO HOUR) = "10"
Ref : working with datetime fields, EXTEND, UNITS
Mariusz Malogrosz
mariusz@tecsys.com