Turning created_at Into Real Times
Options
NWold
Member ✭
My goal is to create a posting mechanism where the post will show how long ago it was posted. For example, "2 hours ago" or "3 weeks" ago.
How would I go about this?
Tagged:
Answers
-
try doing it with function in CRUD, utilize "now" value and created_at and do a datediff with filters or use other math way. and then just output result you want as additional "virtual" key in your data.
here is small example where i add a virtual key price: with a dynamic value to every record in result. it is doing several calculations in background and therefore in api call result every record always have own value from function in a "new" key.inside of function a math result is added as key:value pair to every record, with "set" filter
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback