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)
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.
- 10.7K All Categories
- 13 Getting Started in the Community
- 41 Beastmode & Analytics
- 2.1K Data Platform & Data Science
- 59 Domo Everywhere
- 2.7K Charting
- 2.5K Ideas Exchange
- 1.3K Connectors
- 362 Workbench
- 303 Use Cases & Best Practices
- 503 APIs
- 120 Apps
- 48 News
- 753 Onboarding
- 1.2K 日本支部
- Private Company Board