Skip to main content
Question

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

  • February 27, 2019
  • 3 replies
  • 15 views

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!

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.

3 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • 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+60
  • Celebrity
  • 3702 replies
  • 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

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
  • 11 replies
  • 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

That's solved it. Many thanks!