Query and compare date on google sheets -


i'm working on making replica of sheet1 on sheet2 (same document), , query() worked fine until column want filter formula cells (long ones each query, match, etc).

what want filter rows in sheet1 event date in column m upcoming (there more filter conditions simplify main problem).

i don't want rows date either empty, in past (various date formats), or formula give result of empty string "".

the formulas i've tried (which gives error) - note i'm selecting 2 columns testing:

=query(sheet1!a3:n, " select i,m = 'singapore' , datevalue(m)>today() ",0)

=query(sheet1!a3:n, " select i,m = 'singapore' , m>today() ",0)

this formula doesn't give error doesnt show correct data - shows data except jan 2017 - august 7 2017:

=filter(sheet1!a3:n, sheet1!i3:i="singapore", sheet1!m3:m>today())

this formula gives empty output:

=query(sheet1!a3:n, " select i,m = 'singapore' , m='22 august' ",0)

i'm newbie @ google sheets & apps script appreciate advice thanks!!

there's no today() in query .

   =query(sheet1!a3:n, " select i,m = 'singapore' , m > now() ",0) 

this should work theoretically, provided have correct dates in m in format, google sheets recognises (i.e., formula bar shows correct date or time) regardless of actual string. if not, should manually convert remaining dates correct format. correct format of date entered in query formula date 'yyyy-mm-dd'. doesn't matter format date in sheets ( long google sheets recognises this), actual formula must contain date in format comparison. example , find dates less 31,august, 2017,

        =query(a2:b6, "select < date '2017-08-31'") 

you can use figure out dates, google doesn't recognise: n:n= m:m*1 if error in helper column n, dates not recognised. if did not error, possible google sheets mis-recognizes date.

edit syntax date in google sheets


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -