Skip to content

Instantly share code, notes, and snippets.

@ariebrainware
Created July 30, 2019 15:04
Show Gist options
  • Save ariebrainware/8b8e563f7d166766c807b4cb5d4df194 to your computer and use it in GitHub Desktop.
Save ariebrainware/8b8e563f7d166766c807b4cb5d4df194 to your computer and use it in GitHub Desktop.
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