• Vikas Tiwari 29
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
<lightning:datatable data="{!v.Equipments}"    columns="{!v.equipmentColumns}"    keyField="Id"    hideCheckboxColumn="true"/> 
In Controller:
component.set('v.equipmentColumns', [
          {label: 'Predicted Time', fieldName: 'Prediction_Time__c', type: 'Date', typeAttributes:{year:'numeric',month:'short',day:'2-digit'}},
          {label: 'Origin Station', fieldName: 'Origin_Station__c', type: 'text', sortable: true},
          {label: 'Destintion Station', fieldName: 'Destination_Station__c', type: 'text', sortable: true},
      ]);

Currently it is displaying the date as : 2018-03-15T17:37:00.000Z
but the expected format is : 2018-03-15

Please help