Skip to main content

I'm trying to get a range of dates as a new features.

For ex: if the date range is 02/01/2018 - 02/06/2018, Output features has to be like

02/01/2018,

02/02/2018,

02/03/2018,

02/04/2018,

02/05/2018,

02/06/2018

Any thoughts please? Thank You

 

Tagging in @jlutherthomas, @Mark2AtSafe, @mark_1spatial, @erik_jan, @RylanAtSafe

If you start with a parameter having the number of dates in the range and one for statdate:

Creator for a dummy object.

Cloner to create as many objects as dates in the range.

DateCalcukator to add a number of days using the _copynum from the cloner to the startdate.

And output the resulting dates.


If you start with a parameter having the number of dates in the range and one for statdate:

Creator for a dummy object.

Cloner to create as many objects as dates in the range.

DateCalcukator to add a number of days using the _copynum from the cloner to the startdate.

And output the resulting dates.

@erik_jan - Didn't get you. Couldn't add number of dates in parameter

 

can you please provide test workspace?

 


@erik_jan - Didn't get you. Couldn't add number of dates in parameter

 

can you please provide test workspace?

 

Sure, see attached daycreator.fmw

 

 


If you start with a parameter having the number of dates in the range and one for statdate:

Creator for a dummy object.

Cloner to create as many objects as dates in the range.

DateCalcukator to add a number of days using the _copynum from the cloner to the startdate.

And output the resulting dates.

If you are using FME 2017.1 or Newer, I would recommend using the DateTimeCalculator – likely has the same results, but has the advantage of being a native transformer vs custom transformer.

 

 

Edit: Although, there might be some additional config necessary to get that clone to work.. @erik_jan has crafted a nice approach.

 


Reply