Get current time as formatted string in Go?

后端 未结 8 531
北荒
北荒 2021-01-30 01:15

What\'s the best way to get the current timestamp in Go and convert to string? I need both date and time in eg. YYYYMMDDhhmmss format.

8条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 01:58

    Find more info in this post: Get current date and time in various format in golang

    This is a taste of the different formats that you'll find in the previous post:

提交回复
热议问题