Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
- Posts: 2
- Joined: Mon Mar 24, 2014 8:25 am
Is it possible to get the interval between two timestamps as a scalar number, or to have the timestamp task return a scalar value, for example an astronomical Julian day? I need to loop over (Year, DOY) for a date range that may include Jan 1, and it would be nice to not have to handle the year change manually.
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
On the TIMESTAMP Task .. there is a Date Manipulation Tab. This will allow you to create a Date Variable (yyyyDDD) implicitly or based on current date.
This means that you can specifically give it the Year, Month, Day and it will create the variable for that date.
Code: Select all
<format outputVariable="JulDate" pattern="yyyyDDD" dayOfMonth="21" month="7" year="2015" />
01/05/2015 06:40:36 INFO Executing task 'print 1.0'
01/05/2015 06:40:36 INFO Julian Date-> 2015202
01/05/2015 06:40:36 INFO Finished task 'print 1.0'
Or, you could manipulate based on current date:
Code: Select all
<format outputVariable="JulDate" pattern="yyyyDDD" month="+15" />
01/05/2015 06:43:18 INFO Executing task 'print 1.0'
01/05/2015 06:43:18 INFO Julian Date-> 2016096
01/05/2015 06:43:18 INFO Finished task 'print 1.0'
Your only other option is to call an SQL Function to return the value you are looking for based on some date manipulation algorithm. An option for this might be to create a Utility Project that returns a single value from an SQL Function. There is a function here on the Forum called SQL Help that might give you some direction on this option.
Lead Solutions Consultant
Return to “Community Forum”