Interval between timestamps
Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts
Page 1 of 1
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.
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
asmund,
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.
SQL Help
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
Or, you could manipulate based on current date:<timestamp version="1.0">
<format outputVariable="JulDate" pattern="yyyyDDD" dayOfMonth="21" month="7" year="2015" />
</timestamp>
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'
Code: Select all
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.<timestamp version="1.0">
<format outputVariable="JulDate" pattern="yyyyDDD" month="+15" />
</timestamp>
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'
SQL Help
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts
Page 1 of 1