Print Time In Golang

[Solved] Print Time In Golang | Go - Code Explorer | yomemimo.com
Question : print time in golang

Answered by : asif-iqbal-paracha

package main
import "fmt"
import "time"
func main() { dt := time.Now() // printing the time in string format fmt.Println("Current date and time is: ", dt.String())
}
//Output:
//Current date and time is: 2020-05-05 06:43:01.419199824 +0000 UTC m=+0.000076701

Source : | Last Update : Thu, 17 Mar 22

Answers related to print time in golang

Code Explorer Popular Question For Go