LiveCloud Forums
query operators and dates - Printable Version

+- LiveCloud Forums (https://forums.livecloud.io)
+-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1)
+--- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=3)
+--- Thread: query operators and dates (/showthread.php?tid=101)



query operators and dates - sltfn - 08-23-2019

I think I have a problem I'll need to code around. I am porting an app that formerly worked with MySQL tables to LiveCloud.

This means dates are stored in the MySQL format YYYY-MM-DD: e.g., 2019-08-23.

Unless I'm mistaken, LiveCode's date format options don't include this format. So, I'm guessing (will test soon), none of the available CDB query operators will allow me, for example, to select for a date less than or equal to 2019-08-23.

I assume, per the documentation, that "<=" won't work because the data is non-numeric and that "date<=" won't work because the data will be seen as a non-dateitem.

True? Any workaround suggestions? I'd definitely prefer not to have to reformat hundreds of thousands of records that include dates and rewrite dozens of lines of code that assume the MySQL date format as their basis.

Thanks in advance.


RE: query operators and dates - efrain.c - 08-27-2019

Hi sltfn,

There is no need to reformat your records. The query operators will work with that date format Smile