I am inserting data to a elastic search using CURL, it works fine when i insert with a fixed data. I am trying to Get Current DateTime and assign to a variable and use with the
You can do it like this:
DATE_ISO=$(date +"%Y-%m-%dT%H:%M:%S") ... curl -XPUT 'http://localhost:9200/nondomain_order/orders/'+$number+'' -d '{ ... "CreateDate": "'"$DATE_ISO"'", ... }'