Note: variable names are not supported to start with a number ($4dDate) the line
OB SET($obj;"apiDate";"2019-02-24") does not set a date value. it sets a string that looks like a date to some people. try something like $obj:=New object OB SET($obj;"d1";Current date) OB SET($obj;"d2";"2019-02-26") OB SET($obj;"d3";!2019-02-26!) inspect the object in the debugger, turn on "display types" you would see that d1 looks like "2019-02-26T00:00:00.000Z" in the stringified preview, but "19/02/26" or equivalent in the detailed preview and "date" as type. d2 looks like "2019-02-24" in the stringified and detailed preview and "text" as type. d3 looks exactly like d1 the problem with OB SET($obj;"apiDate";"2019-02-24") $apiDate:=OB Get($obj;"apiDate";Is date) is that you never stored a date or ISO date, just a yyyy-mm-dd string (that has no special meaning in JSON or 4D object), and the "Is date" coercion forces 4D to interpret it as "ISO date" because it is the only kind of date string expected in an object. if you want to use date string in the yyyy-mm-dd (or your local equivalent) you need to $apiDate:=Date(OB Get($obj;"apiDate")) or $apiDate:=Date($obj.apiDate) ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

