I am having a problem sorting/inserting values from a query on both the SQL level and the array level. The problem is this:
I have a form that allows a user to specify both time and date values (seperately) to be inserted into an MS SQL database. There is a column in the table for the date, and a column for the time. Whenever I call CreateODBCTime to insert the time into the time column, the timestamp CreateODBCTime creates uses the date it was added, and not the date specificed by the user. This creates problems when I try to sort values based on the time column in the table.
Is there any way to specify the date for the timestamp value that CreateODBCTime creates?
If not, here's the next part of the problem:
These semi-sorted values queried from the database are now used to populate a 2-dimensional array. The query is as follows:
<cfquery name="theQuery" datasource="theDataSource">
Select theDate, theTime
from theTable
order by theDate, theTime
</cfquery>
The date from each record is one element of the array, and the time is another, like this:
<cfloop query="theQuery">
<cfset array[CurrentRow][1] = theDate>
<cfset array[CurrentRow][2] = theTime>
</cfloop>
Is there any way I can sort the array by theDate, then theTime?
Thanks in advance for help with this difficult problem!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
