0

In SQL Databricks, I know I should use current_date() to get what is in T-SQL is GETDATE().
We're using cluster Runtime 10.5 and the getdate() function actually works, but the word isn't highlighted and when I looked in the documentation I couldn't find it.
Could it be an undocumented functionality? Because if it is, I'd rather not use it. enter image description here

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
Hila DG
  • 688
  • 4
  • 12

1 Answers1

0

current_date() will give you the date portion only (2022-10-02) etc. current_timestamp() and getdate() both will give you the date and the timestamp. But current_timestamp is the documented way, as you mentioned.

inder
  • 61
  • 2