Commit 6f8d3115 authored by haoyanbin's avatar haoyanbin

1

parent ab6c8451
......@@ -187,7 +187,7 @@ func ExportSurveyUserExcel(c *gin.Context) {
f.SetCellValue(fileName, "C"+a, region)
f.SetCellValue(fileName, "D"+a, city)
f.SetCellValue(fileName, "E"+a, v.CZone)
f.SetCellValue(fileName, "F"+a, v.CreateTime)
f.SetCellValue(fileName, "F"+a, utils.StringToTime(v.CreateTime))
f.SetCellValue(fileName, "G"+a, optionData)
f.SetCellValue(fileName, "H"+a, "")
f.SetCellValue(fileName, "I"+a, "")
......
......@@ -92,6 +92,18 @@ func Time2Str(timeVal time.Time) string {
return strTime
}
func StringToTime(data string) string {
to, _ := time.Parse("2006-01-02T15:04:05+08:00", data)
strTime := to.Format("2006-01-02 15:04:05")
if strTime == "0001-01-01 00:00:00" {
strTime = ""
}
return strTime
}
func Time2StrHMS(timeVal int) string {
s := timeVal % 60
if timeVal/60 == 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment