Get the number of weeks and days between two dates
I am needing to find the number of weeks and then the number of leftover days between two dates. I am open to doing this in our on-premise MS SQL, or in Magic ETL or in Redshift or MySQL, whichever is easiest.
If I have dates of 8/1/2020 and 8/9/2020, for example, my expected result would be 1 week and 1 day.
When I am trying MSSQL and using DATEDIFF(week, startdate,enddate) it gives me a result of 2 weeks. Not what I am wanting.
I will need the end result to be two values: number of weeks, number of days (remaining days after the number of weeks, if there are any)