I’m trying to make my app show when a user was last online but i need it to be formatted different if they where not online for a day like WhatsApp.
and if its a longer date its formatted like this
My data base
Store the Last Online as a Date instead of a text.
Dates are very easy to format on the front end by using :formatted as.
You can use custom formatting to display it however you'd like.
This would be HH:MM
This would be dd/mm/yyyy
Dates can be used in conditionals to check for recency, while texts cant. So you can use This User's last online > curent date time + days -1 in a conditional, and the the conditional would be `This user’s last online formatted as HH:MM. (you can add the ‘last seen today at’ statically before the dynamic expression. You can have a set of these conditionals with different wording and formatting.
That’s what he said, but I wouldn’t use this formula because it would appear “today” for the last 24h… instead try: This user’s last online > Current date/time :change hours to 0: change minutes to 0 :change seconds to 1 :formatted as text
Yes → Last seen today at (date:formated as …)
No → Last seen …
The group contains a list of users current user and the other users
that’s why i haver to search because i only want to edit the one of them
the search is to find that user out of the 2 users in a chat
It looks like you are using the old dynamic expression builder. I recommend upgrading to the newer one, its much more powerful!
Go on Settings>>Versions>> Beta Features >> Activate ‘Expression Parentheses’
This allows you to add parenthesis and order of operation. The version you are using reads left to right and doesnt allow you to add the :change hours to a date because the expression is already complete.