Ask a Question related to Adobe Photoshop Elements, Design and Development.
-
Andrew Turek #1
SORT BY DATE
Is it possible when downloading images and then modifying them to include the date they were taken and have that figure (along with Name, Type, Size, etc) as one of the criteria by which they can be sorted?
Thanks again. Sorry if this and the previous question seem obvious but I am new to this.
Andrew Turek Guest
-
SQL Sort by date
This is probably very trivial, but I'm stuck. I have a audit log table like this: Order_Id Status Timestamp 12345 READY ... -
Sort by Date in Datagrid
I can`t Sort by Date in Datagrid, it didn`t read the values as date, it is listed like text. Someonte knows a script to make it correctly? Thank`s. -
Sort by Date (Latest Date that is)
:confused; Hello I have an access db which has text feilds and has a date feild set to the default value of Now() I want to be able to filter a... -
datagrid sort by date
Hi! I have a datagrid which is populated from an Access database. I have a column in the database and in the datagrid where the values are of the... -
Sort on Date Column
1. I have sorts on Date and Name column heads Initial sort is on ORDER BY Date DESC Date Name... -
BobHill #2
Re: SORT BY DATE
Andrew,
Use Windows Explorer (if on a PC) and use Details view. then just click on Date and it'll sort ascending by date (click date again and it'll sort decending by date). Then just Control A (Select All) and right click the blue selected area and click Print. Or Batch in Elements and the list should be in the same order as Explorer put them. It's just not going to be easy to find files if you keep that option set that way instead of by Alpha.
Bob
BobHill Guest
-
-
Dan Bracuk #4
Re: sort by date
This is a sort by date?
order by view_terminations_report.#COOKIE.sortItem# #COOKIE.sortOrder#
Dan Bracuk Guest
-
kt03 #5
Re: sort by date
User either sort by Last name or date. Order by
view_terminations_report.#COOKIE.sortItem# #COOKIE.sortOrder# is also for my
next/previous links
Here is the nessary code.
<CFPARAM name="URL.sortOrder" default="DESC">
<CFPARAM name="URL.sortItem" default="lastname">
<CFPARAM name="URL.firstRec" default="1">
<CFPARAM name="URL.lastRecord" default="0">
<CFCOOKIE name="sortOrder" value="#URL.sortOrder#">
<CFCOOKIE name="sortItem" value="#URL.sortItem#">
<cfquery name="get_distance_name" datasource="#db#">
select lastname, firstname, middlename, TerminationDate,
lower(left(Term_Trans,3)) as Term_trans , status
from view_terminations_report
group by lastname, firstname, middlename, TerminationDate,
lower(left(Term_Trans,3)), status
order by view_terminations_report.#COOKIE.sortItem# #COOKIE.sortOrder#
</cfquery>
<table width="700" cellpadding="0" cellspacing="0" border="1"
style="border-color:#6666CC" align="center">
<tr>
<th width="255" scope="col" class="r_text">Name
<A href="terminations.cfm?sortItem=lastname&sortOrder =ASC"><IMG
src="../images/ascending.gif" border="0" alt="Sort Last Name in Ascending
Order"></A> <A
href="terminations.cfm?sortItem=lastname&sortOrder =DESC"><IMG
src="../images/descending.gif" border="0" alt="Sort Last Name in Descending
Order"></A>
</th>
<th width="260" scope="col" class="r_text">Termination Date
<A href="terminations.cfm?sortItem=TerminationDate&so rtOrder=ASC"><IMG
src="../images/ascending.gif" border="0" alt="Sort Termination Date in
Ascending Order"></A> <A
href="terminations.cfm?sortItem=TerminationDate&so rtOrder=DESC"><IMG
src="../images/descending.gif" border="0" alt="Sort Termination Date in
Descending Order"></A>
</th>
<th>State</th>
</tr>
<cfoutput query="get_distance_name">
<tr>
<td scope="row" class="#class1#">#UCASE(lastname)#,#Ucase(firstnam e)#
#Ucase(middlename)#</td>
<td class="#class1#">#dateformat(terminationdate,'mm/dd/yyy')#</td>
<td class="#class1#">#status#</td>
</tr>
</cfoutput>
</table>
kt03 Guest
-
Dan Bracuk #6
Re: sort by date
So the user decide's how to sort? Fair enough.
For both sorting orders, what are you expecting, and what are you getting?
Also, does this really run without a comma between the two cookie outputs?
order by view_terminations_report.#COOKIE.sortItem# #COOKIE.sortOrder#
If you have debugging turned on, could you show us the query that gets sent to
your database?
Dan Bracuk Guest
-
kt03 #7
Re: sort by date
As I said early user have the option either sort by lastname or date. Here is
the query return from the debuging. ASC or DESC is depend on what image user
click (A-Z or Z-A).
If I cick on A-Z under header: NAME: then I have the query below and it's
working fine
select lastname, firstname, middlename, TerminationDate,
lower(left(Term_Trans,3)) as Term_trans , status
from view_terminations_report
group by lastname, firstname, middlename, TerminationDate,
lower(left(Term_Trans,3)), status
order by view_terminations_report.lastname ASC
If I cick on A-Z under header: : TerminationDate then I have the query below
and it's not sorting correctly. I was sort by the date just like I already
provided on previous post
select lastname, firstname, middlename, TerminationDate,
lower(left(Term_Trans,3)) as Term_trans , status
from view_terminations_report
group by lastname, firstname, middlename, TerminationDate,
lower(left(Term_Trans,3)), status
order by view_terminations_report.TerminationDate ASC
If I do the hard code for date looki like this then it work but this is not
what i am looking to do
order by year(TerminationDate) desc, month(TerminationDate) desc,
day(TerminationDate) desc
kt03 Guest
-
Dan Bracuk #8
Re: sort by date
So you are getting
09/30/04
09/30/04
09/30/03
09/30/99
09/29/04
09/28/05
and you want
09/28/05
09/30/04
09/30/04
09/29/04
09/30/03
09/30/99
Is that it?
You also suggest that terminationdate is a date/time field right?
(I have the dateformat from the database look like this "Sep 30 2004 12:00AM)
If you do this:
<cfquery name="q1">
select distinct terminationdate from view_terminations_report
</cfquery>
<cfdump var="#q1#">
What do your dates look like? Your problem might be that the veiw is
converting your dates to a string.
Dan Bracuk Guest



Reply With Quote

