Question

1
Replies
351
Views
MAZAHARULH Member since 2014 4 posts
CTS
Posted: February 22, 2017
Last activity: February 22, 2017
Closed

Rest Service response displays date 19700101

Steps to reproduce-

Create a Pega REST service where resposne will have a date element.

Now we are formatting the current date as below and stored the value in a param.

Param.Date=@FormatDateTime(@DateTime.CurrentDateTime(),"yyyy-MM-dd", null,null)

Now the value of Param.Date is a String, so we are converting to the date format as below.

.StartDate=@String.toDate(Param.Date), where StartDate is a date type property.

The value of StartDate shows as 19700101 instead of 2017-02-22 in the response.

I'm currently using Pega v7.1.8.

Thanks in Advance.

Data Integration
Moderation Team has archived post
Share this page LinkedIn