All Apps and Add-ons

Challenge in Splunk query

jerinvarghese
Communicator

Need help in the query builder.

| dbxquery connection="ITDW" shortnames=true  query="SELECT
[Incident_Number],
[Assignee],
[Last_Modified_By],
[Customer],
[Customer_Site_Group],
[Customer_Site],
[Summary],
[Notes],
[Priority],
[Assigned_Support_Group],
[Status],
[Status_Reason],
[Resolution],
[Reported_Date],
[Last_Resolved_Date],
[Last_Modified_Date],
[Owner_Group],
[Submit_Date]
FROM [shared].[ITSM_INC_MAIN] INC
WHERE [Submit_Date] BETWEEN DATEADD(D,-3,GETDATE()) AND GETDATE()
AND
[Summary] like '%%' "

I am facing challenge in getting the date changed all time for a search.

Submit_Date
2020-04-04 11:35:51.0
2020-04-04 11:35:57.0
2020-04-04 11:36:13.0
2020-04-04 11:37:22.0

here is how Submit date format comes.

Also below is the line where am facing challenge in providing a defined time.

WHERE [Submit_Date] BETWEEN DATEADD(D,-3,GETDATE()) AND GETDATE()

please help me in editing this line

0 Karma

jerinvarghese
Communicator

any suggestions please

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

1) Are you trying to get all the data for the last 3 days, or are you trying to get data since a particualr time, or what?

2) what is the underlying database, SQL Server or Oracle or what? Time functions are often unique to each implementation of SQL.

0 Karma
Get Updates on the Splunk Community!

Welcome to the Future of Data Search & Exploration

You have more data coming at you than ever before. Over the next five years, the total amount of digital data ...

What’s new on Splunk Lantern in August

This month’s Splunk Lantern update gives you the low-down on all of the articles we’ve published over the past ...

This Week's Community Digest - Splunk Community Happenings [8.3.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...