Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 742035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:42:05+00:00 2026-05-14T08:42:05+00:00

I have produced a data table. All the columns are sortable. It has a

  • 0

I have produced a data table. All the columns are sortable. It has a date in one column which I formatted dd/mm/yyyy hh:mm:ss . This is different from the default format as defined in the doco, but I should be able to define my own format for non-american formats. (See below)

The DataTable class provides a set of
built-in static functions to format
certain well-known types of data. In
your Column definition, if you set a
Column’s formatter to
YAHOO.widget.DataTable.formatDate,
that function will render data of type
Date with the default syntax of
“MM/DD/YYYY”. If you would like to
bypass a built-in formatter in favor
of your own, you can point a Column’s
formatter to a custom function that
you define.

The table is generated from HTML Markup, so the data is held within “” tags.

This gives me some more clues about compatible string dates for javascript:

In general, the RecordSet expects to
hold data in native JavaScript types.
For instance, a date is expected to be
a JavaScript Date instance, not a
string like “4/26/2005” in order to
sort properly. Converting data types
as data comes into your RecordSet is
enabled through the parser property in
the fields array of your DataSource’s
responseSchema

I suspect that the I’m missing something in the date format. So what is an acceptable string date for javascript, that Yui dataTable will recognise, given that I want format it as “dd/mm/yyyy hh:mm:ss” ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:42:06+00:00Added an answer on May 14, 2026 at 8:42 am

    Define your locale

    YAHOO.util.DateLocale["pt-BR"] = YAHOO.lang.merge(YAHOO.util.DateLocale, {
        x:"%d/%m/%Y"
    });
    

    And your column settings as follows

    {key:"columnKey", label:"columnLabel",  
        formatter:function(container, record, column, data) {
            container.innerHTML = YAHOO.util.Date.format(data, {format:"%x"}, "pt-BR");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a database that persist our metadata and data. Our metadata is produced
Recent conversations with colleagues have produced varying points of view on this matter. What
I have two DataTables, A and B , produced from CSV files. I need
I have two bitmaps, produced by different variations of an algorithm. I'd like to
I produce server software and have been fine with all Linux environments so far,
Let's say have something like: SELECT energy_produced, energy_consumed, timestamp1 AS timestamp FROM ( SELECT
I have the occasion to produce Drupal web sites using development, staging, and production
I have some code that produces a set of primary key values that I
I have been trying to produce a statically linked single binary version of my
I have a select query that currently produces the following results: Description Code Price

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.