Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Can't get mm/dd/yyyy hh:mm:ss to sort properly.

Expand Messages
  • Satyam
    When you read data from an external source, it is good that you convert it to JavaScript native datatypes. If they are stored as strings, they will be sorted
    Message 1 of 3 , Aug 30, 2007
    View Source
    • 0 Attachment
      When you read data from an external source, it is good that you convert it
      to JavaScript native datatypes. If they are stored as strings, they will be
      sorted as strings.

      To do that conversion in the DataSource you can provide, besides the name of
      the field, the parser function, such as DataSource.parseDate.

      parseDate uses JavaScript's native Date constructor, which accepts dates in
      serveral formats. If none of those suits you, take that function as a model
      and modify it.

      Satyam


      ----- Original Message -----
      From: "daniel" <dep@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Thursday, August 30, 2007 4:54 PM
      Subject: [ydn-javascript] Can't get mm/dd/yyyy hh:mm:ss to sort properly.


      > Hello. I have one Date/Time field that I can not get to sort properly.
      > Parsing the field as "date" strips off the time (and actually still
      > doesn't sort properly).
      >
      > If anyone can help, i'd appreciate it.
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.484 / Virus Database: 269.12.12/979 - Release Date:
      > 29/08/2007 20:21
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.