From b5ed80da0f19363d285ce07006551bc9083b6817 Mon Sep 17 00:00:00 2001 From: Phillip Ngan Date: Sun, 21 May 2023 16:14:33 +1200 Subject: [PATCH] Fix rendering of dates in filesync view Cannot apply date formatting to a string object; it must be a DateTime object --- XeroNetStandardApp/Views/FilesSync/Index.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XeroNetStandardApp/Views/FilesSync/Index.cshtml b/XeroNetStandardApp/Views/FilesSync/Index.cshtml index a667db0..4a6dc0a 100644 --- a/XeroNetStandardApp/Views/FilesSync/Index.cshtml +++ b/XeroNetStandardApp/Views/FilesSync/Index.cshtml @@ -20,8 +20,8 @@ @item.Name @item.MimeType @(item.Size / 1024) KB - @item.CreatedDateUtc.ToString("d/MM/yy") - @item.UpdatedDateUtc.ToString("d/MM/yy") + @DateTime.Parse(item.CreatedDateUtc).ToString("dd/MM/yyyy") + @DateTime.Parse(item.UpdatedDateUtc).ToString("dd/MM/yyyy") @item.Id?.ToString().Substring(0,8) @item.FolderId?.ToString().Substring(0,8)