Re: [Q]DATETIME convert to DATE
Posted in 1998
In article <6a876o$5vh$1@cssun.mathcs.emory.edu>, Yan Liu
<yan@mathcs.emory.edu> writes
>I have a table with a field DATETIME (year to minute). I need to a
>query based on the field's date part (year to day). for example:
>
You will need to check my syntax as I don't often work with
datetime fields but try
select count(*)
from my_table
where DTTIME FIELD between "1998/01/01 00:00" and"1998/01/01 23:59" and WEEKDAY(DTTIME FIELD) = 1
>select count(*)
>from my_table
>where DATE OF the DTTIME FIELD ="1998/01/01" or
> ------------------------>
> RDAYOFWEEK the DTTIME FIELD = 1
> -------------------------------
>
>Is that possible without any convert after the query?
>Thanks for your suggestions.
>
>--
>Yan
>Anesthesia Computer Service at Emory University Hospital, Atlanta, GA
--
David Williams
Maintainer of the Informix FAQ
Primary site (Beta Version) http://www.smooth1.demon.co.uk
Official site http://www.iiug.org/techinfo/faq/faq_top.html
I see you standin', Standin' on your own, It's such a lonely place for you, For
you to be If you need a shoulder, Or if you need a friend, I'll be here
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care