Hello, I want to enable a button ONLY if corresponding record timestamp is today’s date, my use case is an inspection-visit logging app, I need the supervisors to be able to log new photos related to such visit record as long as it happens in the same day.
I realize I need to somehow get Today’s date and then compare it with Timestamp, but dont know how to get Glide to output today’s date somewhere.
This is a problem I faced many times as well. I always have to calculate the localized time if I expect there are users from different parts of the world, otherwise this logic will put me in trouble.
oh that’s good to know. Though usually expected unless specific function names that says otherwise. So Glide does not store a truncated version of your date/time, but only displays it as you set it. So the format is a display, not a truncate forever.
Should you need to get the whole d/t or even the seconds of it, you still can.
Yes, correct.
But the same behaviour can also trip you up if you start comparing dates and forget (or don’t realise) that each date also has a time component, that may or may not be visible.
oh yeah, it’s just a funny thing to see so many digits as decimals, that you have to catch like “tut tut tut com’ on children, behave, don’t show yourself unless asked”. I remember the 1st time we did a Date1 - Date2 with Notes Domino without knowing 1st it must by divided by (24 * 60 * 60) seconds, otherwise you get a paramount behemoth number… like you dated back pharaoh’s time…
That guilty developer’s fun