Http Request with Todays Date

I would like to use a Http Request with a start_date and end_date both set to (now) I just need the date and not the time.

This would be example:

[type or paste code here](https://xxxxx.xxxxxxx.com/api/request_csv.php?start_date=(now)&end_date=(now))

The xxxx are just to hide the real url.
what would the correct format be?

Thanks

You can use a change node a nd JSONata with $moment().format() to get a date, in the format you require. You can then use Mustache in the url field to substitute the date
e.g.

[{"id":"9fefbf769eeb8eb3","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"consumption\":0,\"interval_start\":\"2022-10-31T23:30:00Z\",\"interval_end\":\"2022-11-01T00:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T23:00:00Z\",\"interval_end\":\"2022-10-31T23:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T22:30:00Z\",\"interval_end\":\"2022-10-31T23:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T22:00:00Z\",\"interval_end\":\"2022-10-31T22:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T21:30:00Z\",\"interval_end\":\"2022-10-31T22:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T21:00:00Z\",\"interval_end\":\"2022-10-31T21:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T20:30:00Z\",\"interval_end\":\"2022-10-31T21:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T20:00:00Z\",\"interval_end\":\"2022-10-31T20:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T19:30:00Z\",\"interval_end\":\"2022-10-31T20:00:00Z\"},{\"consumption\":0.022,\"interval_start\":\"2022-10-31T19:00:00Z\",\"interval_end\":\"2022-10-31T19:30:00Z\"},{\"consumption\":0.027,\"interval_start\":\"2022-10-31T18:30:00Z\",\"interval_end\":\"2022-10-31T19:00:00Z\"},{\"consumption\":0.008,\"interval_start\":\"2022-10-31T18:00:00Z\",\"interval_end\":\"2022-10-31T18:30:00Z\"},{\"consumption\":0.02,\"interval_start\":\"2022-10-31T17:30:00Z\",\"interval_end\":\"2022-10-31T18:00:00Z\"},{\"consumption\":0.003,\"interval_start\":\"2022-10-31T17:00:00Z\",\"interval_end\":\"2022-10-31T17:30:00Z\"},{\"consumption\":0.009,\"interval_start\":\"2022-10-31T16:30:00Z\",\"interval_end\":\"2022-10-31T17:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T16:00:00Z\",\"interval_end\":\"2022-10-31T16:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T15:30:00Z\",\"interval_end\":\"2022-10-31T16:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T15:00:00Z\",\"interval_end\":\"2022-10-31T15:30:00Z\"},{\"consumption\":0.01,\"interval_start\":\"2022-10-31T14:30:00Z\",\"interval_end\":\"2022-10-31T15:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T14:00:00Z\",\"interval_end\":\"2022-10-31T14:30:00Z\"},{\"consumption\":0.007,\"interval_start\":\"2022-10-31T13:30:00Z\",\"interval_end\":\"2022-10-31T14:00:00Z\"},{\"consumption\":0.009,\"interval_start\":\"2022-10-31T13:00:00Z\",\"interval_end\":\"2022-10-31T13:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T12:30:00Z\",\"interval_end\":\"2022-10-31T13:00:00Z\"},{\"consumption\":0.007,\"interval_start\":\"2022-10-31T12:00:00Z\",\"interval_end\":\"2022-10-31T12:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T11:30:00Z\",\"interval_end\":\"2022-10-31T12:00:00Z\"},{\"consumption\":0.024,\"interval_start\":\"2022-10-31T11:00:00Z\",\"interval_end\":\"2022-10-31T11:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T10:30:00Z\",\"interval_end\":\"2022-10-31T11:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T10:00:00Z\",\"interval_end\":\"2022-10-31T10:30:00Z\"},{\"consumption\":0.042,\"interval_start\":\"2022-10-31T09:30:00Z\",\"interval_end\":\"2022-10-31T10:00:00Z\"},{\"consumption\":0.025,\"interval_start\":\"2022-10-31T09:00:00Z\",\"interval_end\":\"2022-10-31T09:30:00Z\"},{\"consumption\":0.01,\"interval_start\":\"2022-10-31T08:30:00Z\",\"interval_end\":\"2022-10-31T09:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T08:00:00Z\",\"interval_end\":\"2022-10-31T08:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T07:30:00Z\",\"interval_end\":\"2022-10-31T08:00:00Z\"},{\"consumption\":0.009,\"interval_start\":\"2022-10-31T07:00:00Z\",\"interval_end\":\"2022-10-31T07:30:00Z\"},{\"consumption\":0.069,\"interval_start\":\"2022-10-31T06:30:00Z\",\"interval_end\":\"2022-10-31T07:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T06:00:00Z\",\"interval_end\":\"2022-10-31T06:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T05:30:00Z\",\"interval_end\":\"2022-10-31T06:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T05:00:00Z\",\"interval_end\":\"2022-10-31T05:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T04:30:00Z\",\"interval_end\":\"2022-10-31T05:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T04:00:00Z\",\"interval_end\":\"2022-10-31T04:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T03:30:00Z\",\"interval_end\":\"2022-10-31T04:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T03:00:00Z\",\"interval_end\":\"2022-10-31T03:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T02:30:00Z\",\"interval_end\":\"2022-10-31T03:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T02:00:00Z\",\"interval_end\":\"2022-10-31T02:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T01:30:00Z\",\"interval_end\":\"2022-10-31T02:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T01:00:00Z\",\"interval_end\":\"2022-10-31T01:30:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T00:30:00Z\",\"interval_end\":\"2022-10-31T01:00:00Z\"},{\"consumption\":0,\"interval_start\":\"2022-10-31T00:00:00Z\",\"interval_end\":\"2022-10-31T00:30:00Z\"}]","payloadType":"json","x":230,"y":3300,"wires":[["ad5c465f84c94b41"]]},{"id":"ad5c465f84c94b41","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"now","pt":"msg","to":"$moment().format(\"YYYY-MM-DD\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":3280,"wires":[["a59660f8257c7f57","f426c571f8d3f5de"]]},{"id":"a59660f8257c7f57","type":"debug","z":"452103ea51141731","name":"debug 106","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":3280,"wires":[]},{"id":"f426c571f8d3f5de","type":"http request","z":"452103ea51141731","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://xxxxx.xxxxxxx.com/api/request_csv.php?start_date={{{now}}}&end_date={{{now}}}","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":410,"y":3340,"wires":[["a59660f8257c7f57"]]}]