I have some input that contains a set of dates. I want to strip the day from the input and sort by just the month and year. I know there are other ways to do this, but why can't I set the format to
yyyy-mm and then specify
options no_values to ensure that the output does not include the day, at all (documentation reference)?
Example data is below. Notably, the output is sorted by day, which I do not want. I only want the output to be sorted by month. Note that this example contains only one month for simplicity.
=query(A2:B,"select A,B where A is not null order by A asc format A 'yyyy-mm' options no_values",0)
output (when looking at cells):
output (when looking at formula bar):