Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Format DateTime

    Hi,

    I need to display all dates in "DD/MM/YYYY" format and if date contains time info, then I need to display it in "DD/MM/YYYY HH:MM" format. All date fields are declared as either 'date' or 'datetime' type in the datasource.

    I have added following code at top level to make it work for fields of type 'date'.

    Date.setShortDisplayFormat("toEuropeanShortDate");

    But I couldn't find a reference to datetime field in documentation of 7.0rc2, so not sure how to set this property for datetime fields.

    Please let me know how we can display datetime fields in "DD/MM/YYYY HH:MM" format just like we are doing for date fields.

    #2
    7.0 did not have a set of built-in formatters for "datetime" fields. You just need to use the general formatter APIs (formatCellValue et al) to add your own.

    Comment

    Working...
    X