package main
import (
"fmt"
"time"
)
func main() {
ct := time.Now()
fmt.Println(ct.Format("15:04:05"))
}
time.Now()
- returns current date timeFormat
- formats datatime"15:04:05"
- will format date in HH:MM:SS
group: date
package main
import (
"fmt"
"time"
)
func main() {
ct := time.Now()
fmt.Println(ct.Format("15:04:05"))
}
16:16:56