Datediff: Total Noobie question
Options

user059525
Member
in Magic ETL
Hello all, I am non-technical, non-SQL speaker trying to figure out DATEDIFF.
My problem
1. In Domo, I have a date that looks like this:10/17/2019 11:06:45 AM (this is a 'date' field in my table)
2. I'd like to add a calculated field that counts how many day from "today" it is.
Can someone send me the Datediff statement I need?
Best,
PR
1
Best Answer
-
Here it is
Datediff( Date(`yourdatefmield`) , Current_Date())
or
Datediff( Current_Date() , Date(`yourdatefmield`))note: you might or might not have to specify Date for your date/time field
thats why I usually prefer to do this: Date(`yourdatefield`). , but that is just me
Domo Arigato!
**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'1
Answers
-
Here it is
Datediff( Date(`yourdatefmield`) , Current_Date())
or
Datediff( Current_Date() , Date(`yourdatefmield`))note: you might or might not have to specify Date for your date/time field
thats why I usually prefer to do this: Date(`yourdatefield`). , but that is just me
Domo Arigato!
**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'1 -
HUGE thanks. Worked perfectly.
1
Categories
- All Categories
- Product Ideas
- 2.1K Ideas Exchange
- Data Connections
- 1.3K Connectors
- 309 Workbench
- 17 Cloud Integrations
- Data & ETL
- 2.3K Magic ETL
- 120 SQL DataFlows
- 667 Datasets
- Visualize & Apps
- 90 App Studio
- 198 Pro-code Components
- 2.6K Charting & Analyzer
- 874 Calculations & Variables (Beast Mode)
- AI & Data science
- 23 Domo AI & AI Chat
- 4 Managing AI
- 18 Jupyter Workspaces
- Automate
- 122 Workflows
- Alerts
- Distribute
- 118 Domo Everywhere
- 284 Reporting
- Manage
- 146 Governance & Security
- 489 APIs
- 11 Add-ins & Plugins
- 13 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 118 Community Announcements
- 5K Archive