Skip to main content
Question

Calculating a 'next scheduled date' based on a 'last scheduled date' plus a frequency (FME 2015)


Forum|alt.badge.img

Hello,

I'm trying to work out a way to calculate a forecasted date from an existing recorded date + a numeric frequency. I understand there is a transformer in a more recent version of FME, however this isn't an option for me.

 

Is there any way I can convert the date into a number, add the frequency, and then convert the number back to a date?

 

Thanks in advance!

3 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • February 27, 2019

I don't have 2015 to check what's possible there, but I think you should be able to convert the date to seconds(%s) in a dateformatter, add the additional amount needed in seconds then convert back to a date


redgeographics
Celebrity
Forum|alt.badge.img+50
ebygomm wrote:

I don't have 2015 to check what's possible there, but I think you should be able to convert the date to seconds(%s) in a dateformatter, add the additional amount needed in seconds then convert back to a date

I'd like to add that if you have the opportunity to upgrade to FME 2018 the DateTimeCalculator will prove very good at this task.


Forum|alt.badge.img
  • Author
  • February 27, 2019
ebygomm wrote:

I don't have 2015 to check what's possible there, but I think you should be able to convert the date to seconds(%s) in a dateformatter, add the additional amount needed in seconds then convert back to a date

That's solved it. Many thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings