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

1
  • 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") Apr 2, 2013 at 19:00

1 Answer 1

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).

3
  • 2
    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. Apr 2, 2013 at 16:01
  • @AndreaSilvestri Answer remains the same. Did it help you? Apr 2, 2013 at 16:18
  • well.... sort of Apr 3, 2013 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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