# Max Date and Time

**URL:** <https://forum.bubble.io/t/max-date-and-time/8801>\
**Category:** Need help\
**Created:** [December 16, 2016, 6:45am UTC](https://forum.bubble.io/t/max-date-and-time/8801 "2016-12-16T06:45:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuthi](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@phuthi](https://forum.bubble.io/u/phuthi)\
**Post date:** [December 16, 2016, 6:45am UTC](https://forum.bubble.io/t/max-date-and-time/8801/1 "2016-12-16T06:45:58Z")

</div>

Hi,

In SQL there is something like “select max(date) from table”. Does anyone know how to do this when querying bubble lists?

Thanks and regards,

Phuthi

---

<div class="post-metadata">

**Author:** ![Scott](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/scott/32/565_2.png) [@Scott](https://forum.bubble.io/u/Scott)\
**Post date:** [December 16, 2016, 6:48am UTC](https://forum.bubble.io/t/max-date-and-time/8801/2 "2016-12-16T06:48:38Z")

</div>

I’m unfamiliar with SQL select statements, so I’ll assume that it returns the date furthest in the future. In Bubble, perform a search sorted by descending and select the first item in the list.

---

<div class="post-metadata">

**Author:** ![phuthi](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@phuthi](https://forum.bubble.io/u/phuthi)\
**Post date:** [December 16, 2016, 6:59am UTC](https://forum.bubble.io/t/max-date-and-time/8801/3 "2016-12-16T06:59:22Z")

</div>

So I have the below:

 ![](https://us1.discourse-cdn.com/bubble/original/2X/8/80d6cce51cf476782db5d02cd52baae3b939c03b.png)

However when I try and select first item it keeps asking for another input after that. Not sure what Í’m doing wrong…

![](https://us1.discourse-cdn.com/bubble/original/2X/8/81005932f077a29d87d77f8f1bcb98848391e6be.png)

Are you able to assist further…

---

<div class="post-metadata">

**Author:** ![pnodseth](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/pnodseth/32/2611_2.png) [@pnodseth](https://forum.bubble.io/u/pnodseth)\
**Post date:** [December 16, 2016, 8:39am UTC](https://forum.bubble.io/t/max-date-and-time/8801/4 "2016-12-16T08:39:39Z")

</div>

I think that might be because you are trying to copy a list, and when you choose :first item thats not a list.  
What do you want to achieve as a result?

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [December 16, 2016, 9:54am UTC](https://forum.bubble.io/t/max-date-and-time/8801/5 "2016-12-16T09:54:21Z")

</div>

You could always add :converted to list (it is right at the bottom of the inputs) after firstitem and that will make it work.

Although, as above, interested as to what you are trying to do. This was make a copy of the oldest thing ?

---

<div class="post-metadata">

**Author:** ![phuthi](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@phuthi](https://forum.bubble.io/u/phuthi)\
**Post date:** [December 16, 2016, 10:33am UTC](https://forum.bubble.io/t/max-date-and-time/8801/6 "2016-12-16T10:33:38Z")

</div>

Yes am trying to copy the newest list based on the created date or modified date
