WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 sortabletable date fix, dack, October 14, 2003
     Re:sortabletable date fix, Ade, November 17, 2003

Subject: sortabletable date fix From: dack Date: October 14, 2003

There have been some postings about how to change the date format and still sort correctly. Erik's stuff is set up as yyyy/mm/dd. Yanks are used to something like mm/dd/yy. Here is a fix that seems to work:

case "Date":
       var parts = sText.split("/");
       var d = new Date(0);
      d.setFullYear('20'+parts[2]);
      d.setDate(parts[1]);
      d.setMonth(parts[0] - 1);
   return d.valueOf();




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX