OK, thanks, I guess that is easier -- just extending the schema. I'll wait to see if anyone has any other ideas, but this could be the easiest approach.
Appreciate the suggestion. On Mar 20, 5:44 pm, djidjadji <djidja...@gmail.com> wrote: > You probably want to sort based on the dateindex, your Model is named > Trend24Hr. > Your best shot is to add a Integer property that just describes the > hour, values [0..23]. > Expanding your schema is not hard. Follow the directions in [1]. > Make sure you first update the code that adds new values to use the > new schema. Then you don't miss an object in the datastore. It's no > big deal to save objects multiple times. > > [1]http://code.google.com/appengine/articles/update_schema.html > > 2009/3/20 Tim Bull <tim.b...@binaryplex.com>: > > > > > Hi, > > > I have a table that has values stored on the hour, stored in a > > DATETIME field. I'm trying to write a query where the date is > > irrellevant, it's the time it was stored that matters (for example, to > > extract the value at midnight every day). > > > I've tried the following with no success - dateindex is a DATETIME > > field. > > > SELECT * FROM Trend24Hr WHERE dateindex = TIME('00:00:00') > > > It returns no result when I know there are some. Is there some way I > > can do this? > > > If not, what options do I have? > > > I could refactor all the values into seperate DATE and TIME fields > > (painful and annoying for several reasons) or I could extract ALL the > > values for the date ranges and only deal with the those that are the > > right hour in my result set (this seems very inefficient as I'll be > > ignoring 23 values for every 1 I need). This second approach really > > limits me to only ever dealing with a months worth of data when I'd > > prefer three months as well. > > > Thanks! > > > Tim > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---