Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Curl command to set date property value

Avatar

Level 4

Hi,

How can I set date as a property value on a node using CURL command?

Currently I am trying to execute below curl command but it is setting as String property.

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" http://localhost:4502/content/my-site/my-page/jcr:content

Thanks,

Radha Krishna N

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Could you please try to add typeHint as well in your command e.g.

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" -F "displayDate@TypeHint=Date" http://localhost:4502/content/my-site/my-page/jcr:content 

Arun Patidar

AEM LinksLinkedIn

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi,

Could you please try to add typeHint as well in your command e.g.

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" -F "displayDate@TypeHint=Date" http://localhost:4502/content/my-site/my-page/jcr:content 

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 4

Hi All,

After surfing over net for couple of hours, found the solution!!

We need to pass TypeHint as Date [1]

So the curl command will be

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" --data "displayDate@TypeHint=Date" http://localhost:4502/content/my-site/my-page/jcr:content

[1] Sling over HTTP | Jukka Zitting

Thanks,

Radha Krishna N

Avatar

Level 4

arunp99088702​ Thanks