I am facing an issue with splitting a time range into days in informix 11.5. My requirement is, I will get two dates for e.g 06/05/2015 11:00:00 to 06/07/2015 03:30:00. I have to split these time range into the following in a stored procedure,
- 06/05/2015 11:00:00 - 06/05/2015 23:59:59
- 06/06/2015 00:00:00 - 06/06/2015 23:59:59
- 06/07/2015 00:00:00 - 06/07/2015 03:30:00
I am new to stored procedure in informix. Your help will be much appreciated.
There are multiple ways to do it, depending on how you want to consume the values. Here's one possible way to do it:
The basic logic shown is:
You could then use something like:
to generate: