Search code examples
apache-spark-sqldateadd

What would be spark-sql equivalent of dateadd (seconds) function in sql?


I want to add 10 seconds to a timestamp column in a dataframe using spark-sql. The date_add() function seems to be able to add days, but not seconds.


Solution

  • You can use selectExpr along with INTERVAL as the example suggests here