Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 01:27 PM
Beginning from Spark 3.0, you may use the
make_interval(years, months, weeks, days, hours, mins, secs)
function if you want to add intervals using values from other columns.
SELECT
id
, Start_time + make_interval(0, 0, 0, 0, time_zone_offset, 0, 0) AS Local_Start_Time
FROM MyTable
https://stackoverflow.com/questions/60209203/adding-variable-hours-to-timestamp-in-spark-sql