cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Azure SQL date function conversion to Databricks SQL.

KVNARK
Honored Contributor II

I need to convert the below azure sql date_add function to databricks sql. But not getting the expected output. Can anyone suggest what can be done for this.

DATE_ADD(Hour,(SELECT t1.SLA FROM SLA t1 WHERE t1.Stage_Id = 2 AND t1.RNK = 1)

4 REPLIES 4

Lakshay
Databricks Employee
Databricks Employee

Hi @KVNARK .โ€‹ , Could you please explain your use case? Also, you can check the date_add function in databricks if it fits your use case.

https://docs.databricks.com/sql/language-manual/functions/date_add.html

SergeRielau
Databricks Employee
Databricks Employee

Can you please post the original Azure usage. What you quote does not seem to line up with what their docs say: https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/functions/date_add

KVNARK
Honored Contributor II

sorry to ping you the wrong one. Thing is I need to convert similar to the above one which is in azure sql db to be converted to adb sql. adding the day (24 hrs) for the date value on top of the existing date value including the timestamp.

Vartika
Databricks Employee
Databricks Employee

Hi @KVNARK .โ€‹ 

Hope all is well!

Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group