Parsing Time in Golang
Parsing time is to convert our time to Golang time object so that we can extract information such as date, month, etc from it easily. We can parse any time by using time.Parse function which takes our time string and format in which our string is written as input and if there is no error in our format, it will return a Golang time object.
Input : "2018-04-24" Output : 2018-04-24 00:00:00 +0000 UTC Input : "04/08/2017" Output : 2017-04-08 00:00:00 +0000 UTC
My Starting Date: 2018-01-20 04:35 My Date Reformatted: 20 Jan 18 04:35 UTC Just The Date: 2018-01-20