Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Javascript code

Avatar

Avatar
Validate 1
Level 1
maurizios322685
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
maurizios322685
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
maurizios322685
Level 1

05-10-2018

Hi eveyone, I'm not an expert about using javascript code in Adobe Campaign but I need help to put a script into the javacode to pass a set of variable. More in detail I am not able to set a variable when the filed is a date format. Below an example of my simple script that I'd like to realize into the javacode where the question mark is my prblem to resolve. Could anyone help me? thanks in advance

// Global Vars

// CMPId (string)

// insert cmpID e internal name

//

vars.cmpId = '108626'

vars.iname = 'OP5201'

//

//insert the date (dd/mm/yyyy hh:mm:ss)

//

vars.date: ????

//

//

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 25
Level 4
Deb007
Level 4

Likes

48 likes

Total Posts

80 posts

Correct Reply

22 solutions
Top badges earned
Boost 25
Affirm 10
Applaud 5
Give Back 5
Establish
View profile

Avatar
Boost 25
Level 4
Deb007
Level 4

Likes

48 likes

Total Posts

80 posts

Correct Reply

22 solutions
Top badges earned
Boost 25
Affirm 10
Applaud 5
Give Back 5
Establish
View profile
Deb007
Level 4

08-10-2018

Hi,

You can try the following snippet which where the input is today's date(10th Oct) in "yyyy/mm/dd hh:mm:ss" format.

vars.myDate = new Date("2018/10/08 10:05:00");

logInfo(vars.myDate.toString());

Regards,

Deb

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
maurizios322685
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
maurizios322685
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
maurizios322685
Level 1

08-10-2018

Thank you very much! Correct!

Best regards

Maurizio