Expand my Community achievements bar.

SOLVED

<sourceTimestamp>{formatDate(optout.@OPT_Date, "%4Y-%2M-%2DT%02H:%02N:%02S") + "+00:00"}</sourceTimestamp>

Avatar

Level 4
  • What is meanin of this: <sourceTimestamp>{formatDate(optout.@OPT_Date, "%4Y-%2M-%2DT%02H:%02N:%02S") + "+00:00"}</sourceTimestamp>

     

    OPT_Date - data type of this field "OPT_Date"  is defined ad "date" in  adobe db

    what this will do to any date :

     

    formatDate(optout.@OPT_Date, "%4Y-%2M-%2DT%02H:%02N:%02S") + "+00:00"

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Formats the date value contained in optout.@OPT_Date  with the given format

https://experienceleague.adobe.com/developer/campaign-api/api/f-formatDate.html

 

You can specify a number in front of certain of these characters. The A and B characters can be followed by a l to use the full name rather than the shortened version or a i to use the name in English. Examples:

  • "%4Y/%2M/%2D" => 2000/01/24.
  • "%A %D %B %4Y" => mon 24 jan 2000.
  • "%Al %D %Bl %4Y" => monday 24 january 2000.
  • "%02H:%02N:%02S" displays the hour, minutes and seconds to two figures.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Formats the date value contained in optout.@OPT_Date  with the given format

https://experienceleague.adobe.com/developer/campaign-api/api/f-formatDate.html

 

You can specify a number in front of certain of these characters. The A and B characters can be followed by a l to use the full name rather than the shortened version or a i to use the name in English. Examples:

  • "%4Y/%2M/%2D" => 2000/01/24.
  • "%A %D %B %4Y" => mon 24 jan 2000.
  • "%Al %D %Bl %4Y" => monday 24 january 2000.
  • "%02H:%02N:%02S" displays the hour, minutes and seconds to two figures.

Avatar

Community Advisor

Hi @Shrutii ,

 

The Function formatDate(optout.@OPT_Date, "%4Y-%2M-%2DT%02H:%02N:%02S") + "+00:00", will given the Output in a Workflow  when a variable is set to that above Value then the Output will be "YYYY-MM-DDTHH:MM:SS+00:00"

 

Example Data for todays Date and Time:

2023-05-22T16:22:15+00:00

 

Regards,

Pravallika.