Skip to main content

Every week we have a field crew collect and add data to a geodatabase throughout the week. At the end of the week the Supervisor wants an excel spreadsheet of all the data collected in that week.

I have a workspace that runs FME every Monday to collect the weeks worth of data. Right now, I use a tester transformer and I pre set the dates for the following week so when the workspace runs, I have the correct weeks' worth of data. We have field in the geodatabase that collects the date the asset was collected. Then I have task schedular set to run the workspace.

 

My question is, is there a way to pre set the dates instead of me re-setting them every week? I have tried using Datetimecalculator but I can't seem to get the parameters right.

 

Please let me know your thoughts, thanks in advance!

 

 

 

Hi @mmcmahon​,

You could use DateTimeStamper to get the current date, then a couple of DateTimeCalculators to get the upper and lower date based on that timestamp. So, if you run the workspace on Monday, but want a Sunday to Sunday window, you can use the first DateTimeCalculator to subtract a day and the second to add six days. You may want to add a DateTimeConverter to round the datetime stamp to the nearest day before the calculations.


Hi @daveatsafe​ 

I followed what you described and I was able to create 2 columns with the have dates for the beginning of the week and the end of the week. How can I get the dates in between the week?

imageThis is what I have so far. I just swapped out the datetimestamper for attributecreator for testing purposes only.

image


Hi @daveatsafe​ 

I followed what you described and I was able to create 2 columns with the have dates for the beginning of the week and the end of the week. How can I get the dates in between the week?

imageThis is what I have so far. I just swapped out the datetimestamper for attributecreator for testing purposes only.

image

Hi @mmcmahon​ . If I understand correctly, you could query the geodatabase with a where clause to return any data collected within the start and end date ranges.


Hi @daveatsafe​ 

I followed what you described and I was able to create 2 columns with the have dates for the beginning of the week and the end of the week. How can I get the dates in between the week?

imageThis is what I have so far. I just swapped out the datetimestamper for attributecreator for testing purposes only.

image

If you have a capture datetime on the records, the simplest solution may be to calculate the difference between the capture datetime and timestamp, the use a Tester to test the range of that difference:

Screen Shot 2023-05-02 at 3.36.26 PM


Reply