Thanks, yep got that change node, no still same error server returns a JSON error but works with the dates.
BTW the site is a dummy site cant share the real site due to API keys
Here it is
[{"id":"d8ae9a2b.d1c158","type":"change","z":"a47938d9.e33ac8","name":"Name","rules":[{"t":"set","p":"startDate","pt":"msg","to":"2020-06-05","tot":"str"},{"t":"set","p":"endDate","pt":"msg","to":"2020-06-06","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":380,"wires":[["dbe964e.c6b6c98"]]},{"id":"b6a42295.96609","type":"inject","z":"a47938d9.e33ac8","name":"","topic":"Get","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":470.0142059326172,"y":376.00567626953125,"wires":[["d8ae9a2b.d1c158"]]},{"id":"9df09be8.563848","type":"ui_text","z":"a47938d9.e33ac8","group":"ff0165a2.2ac3a8","order":3,"width":"","height":"","name":"Yesterdays production 2","label":"Yesterdays production 2","format":"{{msg.payload.energy.values[0].value / 1000 | number : 3}} kWh","layout":"","x":1290,"y":380,"wires":[]},{"id":"dbe964e.c6b6c98","type":"http request","z":"a47938d9.e33ac8","name":"HTTPS","method":"GET","ret":"obj","paytoqs":false,"url":"https://testsite/site/energy?timeUnit=DAY&endDate={{{enddate}}}&startDate={{{startdate}}}&staticdata","tls":"","persist":false,"proxy":"","authType":"","x":940,"y":380,"wires":[["9df09be8.563848","9fdf1a1f.82e008"]]},{"id":"9fdf1a1f.82e008","type":"debug","z":"a47938d9.e33ac8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1210,"y":320,"wires":[]},{"id":"ff0165a2.2ac3a8","type":"ui_group","z":"","name":"Production Details","tab":"a359f4b0.2a6738","order":2,"disp":true,"width":"6","collapse":false},{"id":"a359f4b0.2a6738","type":"ui_tab","name":"Home","icon":"dashboard","order":"1"}]