I have a date 2018-07-10 09:35:39
and seconds 10
.
Now I want to add given seconds to DateTime.
So the final result should be 2018-07-10 09:35:49
I have tried as follow : -
Mydate := 2018-07-10 09:35:39
layout := "2006-01-02 15:04:05"
Seconds := 10
MydateParse, _ := time.Parse(layout, Mydate)
FinalDate := MydateParse.Add(time.Second * Seconds)