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:
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:
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.