This
Interesting. @L.M That is what I get as well. What do you get when you try the other code below. Use either of the date columns for p1
return (typeof p1) + " - " + p1
No. p1 should just be one of your date columns. Also you are missing the “R” in return.
That’s indeed what I tried first, but
BTW, it’s “Return” not “eturn”, no mispelling in the code used, just the screen cap a little late
Make it all lower case: return
Ok, so what Glide is “sending” as the value for any date parameter is dependent on the device’s local date settings. As @Darren_Murphy said we will have an issue with any date passed to plugins or javascript when using dates because the string format changes depending on the local format. There is nothing we can do here to fix it. I’ll report to the Engineers.
Thks, George. Happy to help.
Do you happen to know if Glide stores user’s Time Zone whenever a “current user’s time” is set?
To retrieve if later on.
Thks.
I don’t believe that glide stores the user’s timezone. That needs to be calculated on your end. Obviously several of those options below are plugins, so may or may not work correctly for you, but it gives you a few options to try.
@L.M If you use Google Sheets you could create two columns and use these formulas on row one of each column. Obviously, change the column references to the two date columns. Then use those two columns in your DateDiff p1 and p1 parameters.
={"StartISO";ARRAYFORMULA(IF(LEN(F2:F),TEXT(F2:F,"yyyy-MM-ddTHH:mm:ss.000Z"),""))}
={"EndISO";ARRAYFORMULA(IF(LEN(G2:G),TEXT(G2:G,"yyyy-MM-ddTHH:mm:ss.000Z"),""))}