Date Time

Avatar

Avatar
Validate 1
Level 2
prabhuk78522504
Level 2

Likes

6 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
prabhuk78522504
Level 2

Likes

6 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
prabhuk78522504
Level 2

06-05-2017

Hi All,

        I have a small issue in workflow When I read date value from workflow through display target its showing correct but inside the personalPersonalization blocks date changed one-day minus. Below is my code. Please help me.

 

var dueDate=targetData.paymentDuedate;

 var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
 var Month=monthNames[dueDate.getMonth()];
 var date=dueDate.getDate();
 var year=dueDate.getFullYear();
 dString = date+' '+Month+' '+year;

 

I need output like this full month 1 May 2017 or 21 January 2017

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct reply

231 solutions
Top badges earned
Springboard
Ignite 5
Ignite 3
Ignite 1
Validate 10
View profile

Avatar
Springboard
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct reply

231 solutions
Top badges earned
Springboard
Ignite 5
Ignite 3
Ignite 1
Validate 10
View profile
Amit_Kumar
MVP

09-05-2017

prabhuk78522504,

This is happening because of timezone problem, while displaying using target you are using user time zone while inside personalPersonalization block it is using UTC time zone, try displaying time zone and factoring the correct time zone and you will get a correct response.

Regards,
Amit

Answers (0)