12 Replies
There's nothing below
wait a second bro
lol
i want to compare 2 dates
with c#
but DateTime.Equals, will compare exactly both
and i just want to compare the day/month/year, and not the hour
how can i do that with dates?
You can use
DateOnly
struct maybe
DateOnly.FromDateTime(dateTime)
That'll give you just the date without the time
And you can compare it like you'd normally dowhere (dateTime) is my source date, right?
ye
Angius#1586
REPL Result: Success
Result: DateOnly
Compile: 430.050ms | Execution: 23.288ms | React with ❌ to remove this embed.
Like so
thanks a lot bro
i'll try it when i get home
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.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.