Golang String To Time

[Solved] Golang String To Time | Go - Code Explorer | yomemimo.com
Question : golang string to time

Answered by : abdullah-0kvpuik7ilzv

layout := "2006-01-02T15:04:05.000Z"
str := "2014-11-12T11:45:26.371Z"
t, err := time.Parse(layout, str)
if err != nil { fmt.Println(err)
}
fmt.Println(t)

Source : | Last Update : Wed, 25 Aug 21

Answers related to golang string to time

Code Explorer Popular Question For Go