mardi 22 septembre 2015

get number of working days from date range in SQL for sqlite without extension functions

I have a table that contains the columns start and end, which contain the start and end date of a date range. I want to select the number of working days (number of days excluding saturday and sunday) using pure sqlite3 functionality from each time range. Is there any way to do this?

I checked the several answers for these problem, but many seem to use functions like DATEDIFF which aren't available in sqlite.

Example: Start date '2015-09-19' and end date '2015-09-22' should result in two working days.

Aucun commentaire:

Enregistrer un commentaire