Problem With Unix Lookup

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?


@ThinhDinh Any Ideas

Can you share the javascript?

1 Like

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?

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.

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

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.

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.

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.

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

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.

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