Created
July 30, 2019 15:04
-
-
Save ariebrainware/8b8e563f7d166766c807b4cb5d4df194 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strings" | |
"reflect" | |
"time" | |
) | |
func main() { | |
layout := "2006-01-02" | |
date := "2019-07-08|2019-07-08|2019-07-08" | |
res := strings.Split(date, "|") | |
conv, _ := time.Parse(layout, res[0]) | |
fmt.Println(reflect.TypeOf(conv)) | |
fmt.Println(res) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment