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

RE: [ydn-javascript] Re: Date problem...

Expand Messages
  • Satyen Desai
    Hi, This really depends on what the UI you re building is for. 0/0/0000 is not a valid date. It s used by mysql as a special default value since they can t
    Message 1 of 5 , May 30, 2008
    • 0 Attachment
      Hi,
      This really depends on what the UI you're building is for.

      0/0/0000 is not a valid date. It's used by mysql as a special "default value" since they can't use NULL for non-NULL column definitions.

      You'll need to decide what the UI should display when it gets this invalid date from mysql based on what's most convenient for the application (e.g. default to Today, default to some reference date +/- X, default to 1st Jan of the current year etc.).

      Regards,
      Satyen

      ________________________________________
      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of essainic
      Sent: Wednesday, May 14, 2008 6:07 AM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Re: Date problem...

      Ok, thanks Satyam, I think I understand why the problem appears, but I
      don't understand how I can solve it.

      Somebody have an idea ?

      --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
      >
      > The problem is how the native JavaScript parser understand a date of
      0/0/0.
      > Days and months actually start counting at 1 so 0/0/0 meants one day
      and one
      > month before year 00, that is 1900, which turns out to be end of
      November
      > 1899.
      >
      > Satyam
      >
      >
      >
      > ----- Original Message -----
      > From: "essainic" <essainic@...>
      > To: <ydn-javascript@yahoogroups.com>
      > Sent: Wednesday, May 14, 2008 12:38 PM
      > Subject: [ydn-javascript] Date problem...
      >
      >
      > >I have a mysql database with a date field and when the date is set to
      > > 00/00/0000, yui shows a date set to 30/11/1899 ???
      > >
      > > An idea to have it displayed 00/00/000 ?
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      >
      >
      >
      ----------------------------------------------------------
      >
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG.
      > Version: 8.0.100 / Virus Database: 269.23.16/1431 - Release Date:
      13/05/2008
      > 19:55
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.