Question: I have a column with seconds. The start date is 09/01/2017 01:37:33.
I would like to replace the seconds with the date based on the calculations (taking into account the start date). But I couldn't find any answer to this question... Can someone help me, please?

Answer: 
Convert to POSIXct and add the number of seconds. `seconds` can be a vector of seconds.

```
seconds <- 2
as.POSIXct("09/01/2017 01:37:33", format = "%m/%d/%Y %H:%M:%S") + seconds
## [1] "2017-09-01 01:37:35 EDT"

```
We convert the start date to `as.Posixct` and set it as origin when converting seconds to date -

```
origin <- as.POSIXct("09/01/2017 01:37:33", format = "%m/%d/%Y %H:%M:%S")
# "2017-09-01 01:37:33 EDT"
seconds <- 1:5

as.POSIXct(seconds, origin = origin)
[1] "2017-08-31 21:37:34 EDT" "2017-08-31 21:37:35 EDT" "2017-08-31 21:37:36 EDT" "2017-08-31 21:37:37 EDT" "2017-08-31 21:37:38 EDT"

```