datetime query question
Posted in 1999
Topics: General Discussion
I have a question concerning datetime fields. We get data throughout the day which is posted to the database with a datetime year to second column. What query can I use to access only the data where the minutes and seconds = 00:00? (i.e. something like time MATCHES '* *:00:00') Thanks, James Paul jhp@awips1.abrfc.noaa.gov -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>We get data throughout the day which is posted >to the database with a datetime year to second >column. What query can I use to access only >the data where the minutes and seconds = 00:00? >(i.e. something like time MATCHES '* *:00:00') > >Thanks, > >James Paul This seems to work: where extend( extend(timestamp1, year to hour), year to second ) = timestamp1 - Paul
>>column. What query can I use to access only >>the data where the minutes and seconds = 00:00? >>(i.e. something like time MATCHES '* *:00:00') > >This seems to work: > > where extend( extend(timestamp1, year to hour), year to second ) = timestamp1 > > - Paul And this too: where extend ( timestamp1, minute to second ) = "00:00"