# Problem With Unix Lookup

**URL:** https://community.glideapps.com/t/problem-with-unix-lookup/77677
**Category:** Ask for Help
**Created:** [November 6, 2024, 5:10pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677 "2024-11-06T17:10:09Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)
#### Post date: [November 6, 2024, 5:10pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/1 "2024-11-06T17:10:09Z")

</div>

Okay Back Story, I have Rental Agreements And A Rental Form(Separate Table Looking Up Other Agreements)

I Have A rental Agreement In Place And I Unix Dated Them With A Start Difference And End Difference And Have A Javascript Column Giving Back A List Of Whats In Between.

In One Table I Have The Dates 11/10/2024 To 11/17/2024  
Converted It Gives Me:20036, 20037, 20038, 20039, 20040, 20041, 20042, 20043

The Other Table Has Date 11/06/2024 To 11/09/2024  
Converted Its Giving Me:20032, 20033, 20034, 20035, 20036

My Dilemma Is That Its Returning The “20036” And I Don’t Know Why  
Both Functions Are Written The Same.

Anyone Got Any Idea On Why This Is Happening?

 ![Screen Shot 2024-11-06 at 11.02.58 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/6/16748c267bb33bce066a97da47a364fb04bca350.png)  
 ![Screen Shot 2024-11-06 at 11.03.16 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/1/6173bcf5d16a4f062ad363772d49bd93fd9a1237.png)

---

<div class="post-metadata">

### Author: ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)
#### Post date: [November 6, 2024, 5:11pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/2 "2024-11-06T17:11:36Z")

</div>

@ThinhDinh Any Ideas

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [November 6, 2024, 5:13pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/3 "2024-11-06T17:13:28Z")

</div>

Can you share the javascript?

---

<div class="post-metadata">

### Author: ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)
#### Post date: [November 6, 2024, 5:17pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/4 "2024-11-06T17:17:16Z")

</div>

![Screen Shot 2024-11-06 at 11.17.01 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/3/b36de1ec0092d1d235203bc7caf6c0eb49be98cb.png)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [November 6, 2024, 5:20pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/5 "2024-11-06T17:20:45Z")

</div>

Looking closer at your start and end dates, don’t they all include 20036 in the range? Isn’t the problem with the math for the start and end?

---

<div class="post-metadata">

### Author: ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)
#### Post date: [November 6, 2024, 5:23pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/6 "2024-11-06T17:23:54Z")

</div>

This Is What Im Trying To Figure Out

With Unix Code 11/10/2024 Should Equal 20036  
My End Date Of 11/09/2024 Should Be 20035

I Cant Figure Out Why Its Returning 20036.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [November 6, 2024, 5:29pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/7 "2024-11-06T17:29:32Z")

</div>

Might need to see the math column. The javascript seems fine based on the values passed into it.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [November 6, 2024, 6:11pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/8 "2024-11-06T18:11:13Z")

</div>

Well, without being provided any screenshots of the math involved, I went ahead and did some digging and found the following post.

I don’t know if it’s still the same setup, but assuming it is, my best guess is that time is factoring in somewhere on one of the dates.

> [@List All Dates Between Start And End Date](https://community.glideapps.com/t/list-all-dates-between-start-and-end-date/75667):
>
> I Need A Way To List All Dates Between Start Date And End Date To Eliminate Double Booking Someone For The Same Spot During That Time Anyone Know How To Do This

Rather than dealing with the 1/1/1970 unix date, I would just `TRUNC(Date)` the start and end dates. The result is the google style of date numbers, but essentially it’s the same concept, simplifies the setup, and rules out any issues with underlying times.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 6, 2024, 11:01pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/9 "2024-11-06T23:01:18Z")

</div>

It sounds like a method I used years ago. Can you tell me which app it is and I’ll dive in to take a look?

I guess that the timezone is contributing to the problem here.

---

<div class="post-metadata">

### Author: ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)
#### Post date: [November 7, 2024, 10:45pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/10 "2024-11-07T22:45:38Z")

</div>

Ive Solved The Issue, I Noticed In The Data That It Had A Time With It “11/10/2024 12:00AM”  
I Set Up The Search Column In The Profile Dataset And An Action Would Write It To The Form Field And It Would Write It With The Time, So I Set Up A Format Date Column And Am Writing That. It Has Solved The Issue

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 7, 2024, 11:18pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/11 "2024-11-07T23:18:00Z")

</div>

Just a note, Format Date has been problematic with different browsers in the past, so always make sure you check, especially on iOS/MacOS to see if they behave correctly.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [November 14, 2024, 11:18pm UTC](https://community.glideapps.com/t/problem-with-unix-lookup/77677/12 "2024-11-14T23:18:39Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
