I am a newbie in FME. So please accept my apology if my question sounds stupid. I want to calculate the year of the particulars date on FME.
For example, I want to calculate the year of 31st March of the current year and next year. Similarly, I want to calculate the year of 1st April for the current year, and the previous year. These calculate years along with dates would be stored in columns.
DateTimeNow() to generate the current datetimestamp, which has in it the current year
DateTimeFormat() to extract the current Year with format %Y as the formatter
DateTimeParse() to create a datetimestamp for a particular date, for the current year found with DateTimeFormat()
DateTimeAdd() will add or subtract from this date a particular interval say, +1 year or -1 year
If instead you want to/are more comfortable, working with these functions in equivalent dedicated transformers rather than writing out date/time formulae, have a look at:
DateTimeStamper
DateTimeConvertor
DateTimeCalculator
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
DateTimeNow() to generate the current datetimestamp, which has in it the current year
DateTimeFormat() to extract the current Year with format %Y as the formatter
DateTimeParse() to create a datetimestamp for a particular date, for the current year found with DateTimeFormat()
DateTimeAdd() will add or subtract from this date a particular interval say, +1 year or -1 year
If instead you want to/are more comfortable, working with these functions in equivalent dedicated transformers rather than writing out date/time formulae, have a look at: