Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Sort columne by date (EURO)
Marko Polak
Junior Member

Posts: 2
Registered: 3/15/2003
Member Is Offline
posted on 3/15/2003 at 09:12 AM Reply With Quote
Sort columne by date (EURO)


Have you got any example for using table PRO within this combination ?
Thanks
View User's Profile View All Posts By User U2U Member
nik


Posts:
Registered: 1/1/1970
Member Is Offline
posted on 3/17/2003 at 08:34 AM Reply With Quote

Simple sorting routine for dates is:

return Date.parse(a) < Date.parse(b)
View User's Profile View All Posts By User U2U Member
apawiper
Newbie

Posts: 1
Registered: 10/15/2003
Member Is Offline
posted on 10/16/2003 at 10:00 AM Reply With Quote
The above routine does not work with dates DD-MM-YYYY


Try this function for sorting data with the format: DD-MM-YY (example: 04-02-2005)

function sortdate(a,b){

var dd, d, m, y;
var diau1, mesu1, anyu1, diau2, mesu2, anyu2;
var dat1, dat2;
diau1 = a.substring(0,2);
mesu1 = a.substring(3,5);
anyu1 = a.substring(6,10);
diau1 = diau1 / 10000;
mesu1 = mesu1 / 100;
dat1 = anyu1 - - mesu1 - - diau1;
diau2 = b.substring(0,2);
mesu2 = b.substring(3,5);
anyu2 = b.substring(6,10);
diau2 = diau2 / 10000;
mesu2 = mesu2 / 100;
dat2 = anyu2 - - mesu2 - - diau2;
if (dat1 < dat2)
{
return 1;
}
else
{
if (dat1 > dat2)
{
return 0;
}
else
{
return 0;
}
}
}
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Simple
XP-styled
3D designed
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004