Page 1 of 1

Replacement for plugins.DateUtils.createDateSeries

PostPosted: Thu Aug 23, 2018 1:40 pm
by drookwood
In Servoy 5 I have been using the DateUtils plugin to create a series of dates which has been useful. In Servoy 8 I am now trying to find a suitable replacement for this function using the svyDateUtils but don't see an obvious option other than looping from start date to end date and programmatically creating a series that way. Is there another way?

Re: Replacement for plugins.DateUtils.createDateSeries

PostPosted: Tue Aug 28, 2018 2:44 pm
by swingman
Not sure if this is of any use in your case, but PostgreSQL has set-returning functions which can be used to generate sequences including those of dates:
Code: Select all
SELECT generate_series('2018-08-01'::timestamp,'2018-08-25', '1 day')

Re: Replacement for plugins.DateUtils.createDateSeries

PostPosted: Tue Aug 28, 2018 3:23 pm
by drookwood
Hi Christian,

Thanks for that - I will file it away for when I switch from Sybase (!) to PostgresSQL, hopefully soon.