Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
Add week to any date and generate attribute
pallav
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)
Find more posts tagged with
AI Studio
Generate Attributes
Accepted answers
hbajpai
Hey
@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)
All comments
hbajpai
Hey
@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)
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups