At Google Sheets, I am looking for an array formula to provide the first day of the month for a given date. For example, if A1 is 1/17/12 20:30 B1 will read 1/1/12 and so on. The formula must keep the date format so that I can sort by date in column B in this example.
1/17/12 20:30
1/1/12
I think you could just βmake upβ a new date using the DATE formula. eg.
=Date(Year(A1);Month(A1);1)
Let me add to the contribution of Enrique ...
I can use the following formula in cell B1:
=ArrayFormula(if(A:A,eomonth(A:A,-1)+1,))
where column A contains dates or timestamps
Source: https://habr.com/ru/post/1391743/More articles:In R, using the data.table, how to exclude rows and how one of them includes NA values ββin an integer column - selectProblems with vmouse WP7 jQueryMobile events - jquery-mobileHow to move a DIV to a DOM with a flash player without forcing the flash player to update - jqueryCSS3 Transition from normal to absolute flow position - cssHow to extract the part of the video corresponding to this sound clip? - javaChange default exe file icon - autoitMathematica 8.0, obvious simplification omitted, why? - wolfram-mathematicaConsolidation Issues - Reserves and Transaction Queues in the Google App Engine Developer Server? - pythonHow to find out the final size of a program after compilation on avr32 - sizeCombine vector benefits with Bitmap in an HTML canvas element - how? - javascriptAll Articles