Human readable time format
Options
![Mach](https://us.v-cdn.net/6037124/user_avatars/3598414.jpg)
Mach
Member ✭
I'm trying to use the default 'created_at' timestamp to show the date a post was made in a GET request.
I have created a For Each Loop function and updated the variable to a human readable time format but it returns the epoch format.
Is there a different trick to this or this is not possible in the default timestamp?
I have created a For Each Loop function and updated the variable to a human readable time format but it returns the epoch format.
Is there a different trick to this or this is not possible in the default timestamp?
Comments
-
Can you show the function stack in a screenshot or two?
-
the internal format is a unix timestamp in milliseconds. If you wanted to change that you would need to update it before sending it out as the result. This would be similar to what you are doing when you store it.
We have had requests to choose how the timestamp is stored to make things easier but haven't gotten to it yet. -
For the GET SINGLE request it works well but I'm struggling with the list
[Time stamp 1.PNG][Time stamp 0.PNG] -
see below[Time stamp.PNG]
[Time stamp 1.PNG][Time stamp 0.PNG] -
I think you need to update item.created_at instead of model.created_at. -
Thanks . This worked.
-
🙌
-
Very close. You want to update the item variable inside the for loop.
Model is the list and item is each entry of that list.
Change it in both places within the update variable statement. -
Thanks Sean,
This was sorted
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