1

I'm trying to make this query work on my spreadsheet on chrome Win7:

=QUERY(A1:D5;"SELECT MAX(A), COUNT(A), SUM(C) 
              GROUP BY (A) FORMAT MAX(A) 'MMMM' ")

Everything is ok except for the format part. I'd like my date to show just as a month name but it shows exactly in the standard way (dd/MM/YYYY).

I would like to point out that neither a simple query like

=QUERY(A1:D5;"SELECT A FORMAT A 'MMMM'") 

displays the dates in the wanted format =\

What am I doing wrong? The document I'm working on is this: BENZINA

  • If you use this formula, then all blank row are ignored: =QUERY(A:E;"SELECT B, COUNT(A), SUM(D) WHERE D IS NOT NULL GROUP BY B") – Jacob Jan Tuinstra Apr 2 '13 at 19:00
2

That's not possible. The QUERY documentation is primarily meant for the Google Visualization API and not the QUERY function in Google Spreadsheet. Read the following thread from the Google Product Forum: QUERY FORMAT.

What you could do instead, is to create a second column, containing the date format you want: MONTH(A2).

  • 1
    In the Documentation for the QUERY function of the Spreadsheet there's a link to the Google Visualization API and it says to follow the guidelines written there. Reference for Query Funtion. I've thought about the second column but it would have been better if I could keep just one. – Andrea Silvestri Apr 2 '13 at 16:01
  • @AndreaSilvestri Answer remains the same. Did it help you? – Jacob Jan Tuinstra Apr 2 '13 at 16:18
  • well.... sort of – Andrea Silvestri Apr 3 '13 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.