Simple Datediff in Analytics Not Working

Nick Latocha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 10, 2024

I'm trying to run the following query and getting an error. I'm new to Analytics but experienced in SQL

 

SELECT TOP 1000 [Risk].[Date Created],

DATEDIFF([Risk].[Date Created], {TODAY}, "Day")

FROM [current_dw].[Risk] AS [Risk]

 

Your data source returned: 'Risk.Date Created' is not a recognized datediff option.

1 answer

0 votes
Tracy Chow
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 10, 2024

Hi Nick,

It looks like you're querying a Jira Align Enterprise Insights data source, is that correct? It's a SQL Server database in the backend, so you will need to use SQL Server functions and syntax.

The datediff function in your query can be edited to the following: DATEDIFF(day, [Risk].[Date Created], {TODAY})

Let me know if that works for you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events