Datediff: Total Noobie question
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
- 10.5K All Categories
- 7 Connect
- 917 Connectors
- 250 Workbench
- 465 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 193 Visualize
- 252 Beast Mode
- 2.1K Charting
- 11 Variables
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 246 Distribute
- 62 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 173 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive