cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Esteemed Contributor
Esteemed Contributor

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
Valued Contributor
Valued Contributor

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
Moderator
Moderator

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!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.