The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Add week to any date and generate attribute
I have one column like
And One starting Date something like 01/01/2018.
I have to generate one new attribute "54_week" which will be my starting date(01/01/2018) + 54 week
And then make one new attribute "FLag" with condition IF(SVC_dt<=54_week,1,0)
And One starting Date something like 01/01/2018.
I have to generate one new attribute "54_week" which will be my starting date(01/01/2018) + 54 week
And then make one new attribute "FLag" with condition IF(SVC_dt<=54_week,1,0)
Tagged:
0
Best Answer
-
hbajpai Member Posts: 102 UnicornHey @pallav,
You can generate a new attribute with date_add function that will add 54 weeks to the existing attribute. The flag attribute can be created easily by using date_before or date_after functions in generate attributes, you can use date_diff which is more precise and returns delta time in ms.date_add(Col,54,DATE_UNIT_WEEK)
Best,
Harshit5