# Sort by a custom field - date

**URL:** <https://forum.builder.io/t/sort-by-a-custom-field-date/5335>\
**Category:** General\
**Created:** [April 10, 2024, 7:29am UTC](https://forum.builder.io/t/sort-by-a-custom-field-date/5335 "2024-04-10T07:29:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaileshbassi](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@shaileshbassi](https://forum.builder.io/u/shaileshbassi)\
**Post date:** [April 10, 2024, 7:29am UTC](https://forum.builder.io/t/sort-by-a-custom-field-date/5335/1 "2024-04-10T07:29:16Z")

</div>

I am facing an issue while sorting with a custom field “date”. PFA for the screenshot of the field created within the structured data model.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/a/a7aac96a40652fe4fe3bfd9974730866cd6e2ede.png)

I am using the sort object i.e.  
{  
“sort.data.date”: -1  
}

by the response received is not sorted based on the customfield “date”.

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [April 16, 2024, 4:36pm UTC](https://forum.builder.io/t/sort-by-a-custom-field-date/5335/2 "2024-04-16T16:36:57Z")

</div>

Hello @shaileshbassi,

Sorting doesn’t work well with Date custom field type, therefore, we recommend using timestamp custom field

https://www.loom.com/embed/0f7852ce1a194ee1b9b8b04e02ddb9cb?sid=8b0ad8f7-df78-4902-abb9-28372180922d
