I've created_date
column as a string and value of it like 2018-10-04 15:42:19.000404667 +0000 UTC m=+103.387519062
which I got from mongo
db columns and now I inserted it into mysql
table and of course it is of string
type. Now the problem is that I can't parse it and formatted it as well, here I tried with below code to parse but can't get solution.
tm, err := time.Parse("2006-02-01", "2018-10-04 15:42:19.000404667 +0000 UTC m=+103.387519062")
if err != nil {
fmt.Println(err)
}
And it printed with some errors like :
parsing time "2018-10-04 15:42:19.000404667 +0000 UTC m=+103.387519062" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse " 15:42:19.000404667 +0000 UTC m=+103.387519062" as "T"
I tried with different const
of time
package but still digging into it, what I'm missing here or am I doing parse with wrong date
type.
Thanks.