Expand my Community achievements bar.

SOLVED

How to store the transaction date of each customer into a variable like array

Avatar

Level 2

Hi,

I want to store the transaction date by converting into string format(dd-mon-yyyy) and that should stored in a variable for some personalization. Actually I am able to convert the transaction date into string format , But the problem is transaction date is differ for each customers.

Previously I had done with following method using java script activity

1. Created one attribute in schema

2. Converted the transaction date into string format

3. Using xtk.session.Write method() stored the string_format of transaction date.

But is there any possibility to store all transaction date under single variable and the same should be used for personalization.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Sakthikumar,

I'm not able to catch the complete context of your requirement, but you can try one of the following:

  1. Use <compute-string> inside schema to generate a computed column in the desired string format.
  2. On the fly, inside your workflow you can use the available SQL function to convert them to desired format.
  3. Inside delivery, make use of JS code to convert them in desired formation using formatDate() function and use for personalization.

Hope it helps.

Regards,

Vipul

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Hi Sakthikumar,

I'm not able to catch the complete context of your requirement, but you can try one of the following:

  1. Use <compute-string> inside schema to generate a computed column in the desired string format.
  2. On the fly, inside your workflow you can use the available SQL function to convert them to desired format.
  3. Inside delivery, make use of JS code to convert them in desired formation using formatDate() function and use for personalization.

Hope it helps.

Regards,

Vipul