C
C#2y ago
SWEETPONY

❔ How to remove 00:00 in datetime?

I have following datetime: "{Value:dd.MM.yy HH:mm}" which returns this: 01.01.2001 00:00 is it possible to remove 00:00?
11 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SWEETPONY
SWEETPONY2y ago
I need this: 01.01.2001 00:00 => 01.01.2001 01.01.2001 13:34 => 01.01.2001 13:34 remove only if 00
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SWEETPONY
SWEETPONY2y ago
one moment I use NodaTime so my full code looks like this: NodaTime.LocalDateTime.Start.Value:dd.MM.yy HH:mm
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SWEETPONY
SWEETPONY2y ago
yep I can do it but I wanted to use datetime patters such as dd.mm etc idk
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SWEETPONY
SWEETPONY2y ago
sigh ok thanks I will write a function for formatting instead
Anton
Anton2y ago
yeah just if the time is 0, use the format without the time
FusedQyou
FusedQyou2y ago
Pretty sure this is a fairly common issue that is not easily fixed...
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.