This content has been marked as final. Show 5 replies
What does the order by clause in your query look like?
hi dan, this is my current query
<cfquery name="art_fav" datasource="#application.datasource#">
SELECT name_usr, name_art, date_fav
LEFT OUTER JOIN artists_fav
ON user_usr.id_usr = artists_fav.id_usr_fav)
LEFT OUTER JOIN artist_art
ON artist_art.id_art = artists_fav.id_artkey_fav
WHERE id_usr_fav IN
WHERE id_main_friend = #session.auth.idnumber#
AND update_friend = 1)
AND id_usr <> #session.auth.idnumber#
ORDER BY date_fav
You probably identified the cause correctly when you mentioned the time portion of the date field. Many dbs have functions that convert dates to text. An example would be oracle's to_char function.
Along the lines of Dan's last post, here's a Transact SQL statement you can run in a select clause to
SELECT CAST(date_fav AS smalldatetime) as mydate
One quick note, if you don't need to record the time in your date column, you can use the SQL Server data type: smalldatetime. This records only the date and not the time (i.e., Jan 1 2007).
i will have a look at a similar function for my mysql database