I need to query an i5 database that holds separate date and time fields with a date/time range.
Example criteria:
$FromDate = 04/01/12
$FromTime = 06:00:00
$ToDate = 04/12/12
$ToTime = 13:30:00
The i5 table contains a single date and single time field.
Of course, PHP allows many ways to convert those strings, and even combine each time and date into a Unix timestamp. Ideally, there would be a way in the i5 query to combine the queried date and time fields into Unix, which would easily produce the data in the range specified, but I have been unable to find that to be a possibility.
The i5 date and time are stored in standard AS400 format. (Date: 1120401, Time: 133200)
The main problem here (as I see it) is some way to combine the i5 date and time fields so that they can be compared in the query to the date range.
I am totally scratching my head.