Go-Time
2017-01-14 21:13
357 查看
日期&时间格式化。
package main import ( "fmt" "time" ) func main() { now := time.Now() now_string := fmt.Sprintf("%d%02d%02d-%02d%02d%02d-Others", now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second()) fmt.Println("Current Time: ", now_string) }
相关文章推荐
- dos 日期时间格式设置使用小结(Date和Time)
- Insert Date and Time into Access
- Java中Timer的用法详解
- 解析mysql中UNIX_TIMESTAMP()函数与php中time()函数的区别
- 使用 MySQL Date/Time 类型
- shell(bash)下“time” 命令的输出详解
- java8中新的Date和Time详解
- 详解Python编程中time模块的使用
- php中time()和mktime()方法的区别
- PHP中time(),date(),mktime()区别介绍
- Python中的localtime()方法使用详解
- Python中的ctime()方法使用教程
- 简单学习Python time模块
- Python中的time模块与datetime模块用法总结
- python time模块用法实例详解
- 详解Python中time()方法的使用的教程
- Python中time模块和datetime模块的用法示例
- 在Python中操作时间之mktime()方法的使用教程
- 在Python中处理时间之clock()方法的使用
- Python中用sleep()方法操作时间的教程