How to find the Difference between Months of two dates. Eg : 01/01/2017(start date) and Curdate.?
Best Answer
-
Here's a beastmode to calculate the difference in months
period_diff(date_format(`Enddate`, '%Y%m'),date_format(`Startdate`, '%Y%m'))
Just plug in your own date values and you should be good to go.
Let me know if that wasn't what you were looking for.
Sincerely,ValiantSpur
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.2
Answers
-
There's a beast mode that can do this.
DATEDIFF
Returns the number of days between two dates from datetime values.
DATEDIFF(CURRENT_DATE(), 'lastmoddate')Is that what you're looking for?
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Thanks for your reply Aaron, I am looking to calculate age in Months.
Eg: How to calculate the number of months between two Dates.According to Excel formaule= Datdif(Startdate,Enddate+15,"M"), considering the values mentioned above in the question, expected answer is 14 months difference between date 01/01/2017 to todays date(2/26/2018).
Im looking something similar in DOMO.
0 -
Here's a beastmode to calculate the difference in months
period_diff(date_format(`Enddate`, '%Y%m'),date_format(`Startdate`, '%Y%m'))
Just plug in your own date values and you should be good to go.
Let me know if that wasn't what you were looking for.
Sincerely,ValiantSpur
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.2 -
Thank you! it just works fine ?
1 -
How do partial months and rounding come in to play for your business?
Is Jan 1 - Feb 28 two months? What about Jan 15 - Feb 14? One month or two?
What about Jan 31 - Mar 1? One month or three?
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 657 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 775 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 81 Workflows
- 23 Code Engine
- 40 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 1 AI Projects and Models
- 18 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 144 Manage
- 140 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive