修改時間呈現

This commit is contained in:
b110212000 2021-07-21 14:44:43 +08:00
parent 2966e27550
commit 46c4f44fb1

View File

@ -10,6 +10,7 @@ using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Globalization;
namespace SolarPower.Controllers
{
@ -604,8 +605,8 @@ namespace SolarPower.Controllers
switch (post.GroupType)
{
case 0:
a.TOTALTIME = Convert.ToDateTime(a.TIMESTAMP).ToString("yyyy-MM-dd");
a.TIMESTAMP = Convert.ToDateTime(a.TIMESTAMP).ToString("yyyy-MM-dd HH:mm:ss");
a.TOTALTIME = Convert.ToDateTime(a.TIMESTAMP).ToString("yyyy-MM-dd ");
a.TIMESTAMP = Convert.ToDateTime(a.TIMESTAMP).ToString("HH tt", CultureInfo.InvariantCulture);
break;
case 1:
a.TOTALTIME = Convert.ToDateTime(a.TIMESTAMP).ToString("yyyy-MM");