Date and hour values to timestamp

nmizzell
nmizzell Contributor

Hi Domo,

I have two columns: a date column (date datatype) and an hour column (0-23 integer type).

What formula could I use to combine the two columns into a timestamp, assuming the minutes, and seconds are zero?

Thanks,

Best Answer

  • Godiepi
    Godiepi Coach
    edited April 19 Answer ✓

    Try this

    DATE_ADD( YourDateField , INTERVAL YourIntegerField HOUR)

    Domo Arigato!

    **Say 'Thanks' by clicking the thumbs up in the post that helped you.
    **Please mark the post that solves your problem as 'Accepted Solution'

Answers

  • Godiepi
    Godiepi Coach
    edited April 19 Answer ✓

    Try this

    DATE_ADD( YourDateField , INTERVAL YourIntegerField HOUR)

    Domo Arigato!

    **Say 'Thanks' by clicking the thumbs up in the post that helped you.
    **Please mark the post that solves your problem as 'Accepted Solution'