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
Getting parts of a date
SimonW18272
Member Posts: 13 Learner I
in Help
Hello together.
I got a question. When I want to create a new attribute I have the following problem.
I have a date which is in forma contaning month, day, year, time.
However I just want to extract the Month and the year so that the format is YYYY:MM
I found in the internet only the
date_get(Att1,DATE_UNIT_MONTH)
Operator.
However I am now courious if it is easily possible to get also the year within this operator so that I have the YYYY:MM of the att1
My operator should look like
date_get(Att1,DATE_UNIT_YEAR_MONTH)
However it isnot possible this way.
Can someone help me to keep the date format (not nominal/...) and just the year and month in one attribut
Tagged:
0
Answers
Year and month are two numerical attributes. How would you represent them in one numerical attribute?
If you need them in one attribute, you need to convert them to a nominal attribute. The formula for that is date_str_custom(Att1, "yyyy:MM").
Regards,
Balázs