コミュニティアチーブメントバーを展開する。

Adobe Experience Platform (AEP) & Apps User Groups are live to Network, learn, and share in your regional locations.
解決済み

adding dates in calculated field while ingestion

Avatar

Level 2

We have two fields one contains a date and one contains a number of days an integer. So we want to add the number of days in the current date and create a new one. 
Example :

Date : 6/27/2024

AddDays: 10

output we want 7/7/2024
Please tell how can I implement this in calculated field.

トピック

トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。

1 受け入れられたソリューション

Avatar

正解者
Level 1

I have done something similar but for years. On ingestion I used set_date_part("yyyy",to_integer(split(warrantyDate,"/")[2])+WarrantyLength,date(warrantyDate, "M/d/yyyy")) to add the warrantyLength int to the year from warrantyDate.

Example:

WarrantyDate = "01/01/2024"

WarrantyLength = 2

the returned value would be 01/01/2026

元の投稿で解決策を見る

2 返信

Avatar

Community Advisor

Hi @vs1985  - I don't think there is a data prep function available for this, you would have to do it in the source system ingesting the data.

 

Thanks,

Arpan

Avatar

正解者
Level 1

I have done something similar but for years. On ingestion I used set_date_part("yyyy",to_integer(split(warrantyDate,"/")[2])+WarrantyLength,date(warrantyDate, "M/d/yyyy")) to add the warrantyLength int to the year from warrantyDate.

Example:

WarrantyDate = "01/01/2024"

WarrantyLength = 2

the returned value would be 01/01/2026