Format date in material ui table react js

1.4k Views Asked by At

hello im trying to format the date in my table

date in my table

i want to format it like ' dd-mm-yyyy hh:mm

this is my columns code :

const columns = [
    { field: 'dataInici', headerName: 'ID', width: 200,   type: 'date',},
    { field: 'idSolicitud', headerName: 'id Solicitud', width: 130, },
    { field: 'decisioFrau', headerName: 'Risc', width: 130  },
    {
      field: 'importe',
      headerName: 'importe',
      type: 'number',
      width: 90,
    }
  ];


and this is my table code

    <div style={{ height: 400, width: '100%' }}>
            <DataGrid 
                    getRowId={(r) => r.idSolicitud}

              rows={items}
              columns={columns}
              pageSize={20}
              rowsPerPageOptions={[20]}

            />
          </div>
0

There are 0 best solutions below