now := time.Now()
dateString := "2022-01-01" date, err := time.Parse("2006-01-02", dateString) if err != nil { // handle error }
dateString := now.Format("Jan 2, 2006 3:04 PM") fmt.Println("Current time:", dateString)The Time Clock is part of the standard Go Time package.