2
I am in need of an SQL command (Sqlite for android), which returns the interval of one week (from Sunday to Saturday) of an informed date. For example: inform the date '05-05-2016', hence the sql command would return me the range '01-05-2016' and '07-05-2016' (from Sunday to Saturday) which corresponds to the week of the date informed. Another example (to be clearer still kkkk), I inform the date '01-04-2016', hence the sql function would return me '27-03-2016' and '02-04-2016' (which corresponds from Sunday to Saturday, the date informed).
Would that be more or less? http://answall.com/questions/76146/mostrar-todos-dias-entre-duas-datas/76150#76150 . This example here is in SQL-Server.
– Marconi
It would not be that Marconi, I need only the beginning date of a week (Sunday) and the end date of this week (Saturday). As in the example, which I mentioned... I inform '05-05-2016', hence I have the return '01-05-2016' and '07-05-2016' (first day of the week of the informed date (Sunday) and the last day of the week
– Rauny Henrique
Shouldn’t this type of calculation stay in the application? Because it is passing this responsibility to the database?
– Thiago Lunardi
I’m a beginner in SQL, I know almost nothing yet, but I’m making a "filter" to take the dates corresponding to the week in the format I spoke about (Sunday to Saturday of the date mentioned), and make a sum of the data of this date range.
– Rauny Henrique