The period between two dates

Asked

Viewed 253 times

0

How to get a period between two dates?

d1, _ := time.Parse(time.RFC3339, "2018-10-27T00:00:00Z")
d2, _ := time.Parse(time.RFC3339, "2018-10-28T00:00:00Z")
// Não funciona.
fmt.Println(d2 - d1)

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.