How to set time to dd-MMM-yyyy from HH:mm:ss in golang?

Answer • 1 Asked • Oct 20 2019
package main import "fmt" import "time" func main() { fmt.Println(time.Now().Format("01-JAN-2006 15:04:00")) }

The output should be like if date time today is 2016-03-03 08:00:00 +0000UTC Output: 03-MAR-2016 08:00:00 Time should be in 24hr format.

Write your answer...

On a mission to build Next-Gen Community Platform for Developers