main.go 759 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package main
  2. import (
  3. "fmt"
  4. "strings"
  5. "time"
  6. )
  7. func main(){
  8. fmt.Println(strings.Index("SELECT TRIM(barid) barid,(select bname from bar where pastureid =barmilk. pastureid and id = bar #kptCattleId5822", "#kptCattleId"+"5822" ) )
  9. times , _ := time.Parse("2006-01-02","1899-12-30")
  10. println(times.AddDate(0,0,43850).String())
  11. timestr := "01-02-20"
  12. println(strings.Count("01-01-20","-"))
  13. println("20"+timestr[6:]+"-"+ timestr[:5])
  14. //resp1, err :=http.Post("https://kptyun.cn:8082/auth", "application/x-www-form-urlencoded",nil)
  15. //
  16. //
  17. //
  18. //if err != nil {
  19. // fmt.Println(err)
  20. //}
  21. //
  22. //defer resp1.Body.Close()
  23. //body1, err := ioutil.ReadAll(resp1.Body)
  24. //if err != nil {
  25. // // handle error
  26. //}
  27. //
  28. //fmt.Println(string(body1))
  29. }