Time add using DateTime column and Integer Column

I need to create a calculated column that takes the time part of a 24-hour formatted datetime column (mm/dd/yyyy hh:mm:ss) and adds X number of hours to that time, based on hours reported in from an Integer column. The resulting column should also be in datetime format.

I’m not finding a transform that can do that sort of manipulation with datetime fields. How can that be accomplished in Parabola?

Hey Michael!

You will need to do that following:

  1. Use the Date Formatter to convert your old format MM/DD/YYYY HH:mm:ss to Unix time, which is X
  2. Then use a Math step to convert the integer hours column you have into seconds, by multiplying it by 3600. In that same equation, add the the seconds count to your unix timestamp.
    Use another Date formatter to convert the date back to your normal format.

Unix time is measured in number of seconds, so its useful when you need to perform math on date times!

Thanks Brian, that works perfectly!