Azure SQL date function conversion to Databricks SQL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 08:01 AM
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)
- Labels:
-
DateFunction
-
SLA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 11:07 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 11:38 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 09:10 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 03:21 AM
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!