Answer the question
In order to leave comments, you need to log in
How to get the desired time display?
time.Now() produces a string like
2019-08-26 09:47:09.557949552 +0300 MSK m=+4.752612985
2019-08-26 09:47:09
Answer the question
In order to leave comments, you need to log in
Magic date and time instead of the usual "%d.%M.%Y %H:%M"
package main
import (
"fmt";
"time"
)
func main() {
t, _ := time.Parse("2006-01-02 15:04:05", "2019-08-26 11:10:02");
fmt.Println(t.Format("02.01.2006 15:04:05"))
}
26.08.2019 11:10:02
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question