How can I do to get the format dd/MM/yyyy using react.js?

I am trying to have the good format for the date : dd/MM/yyyy. Now I get 1606348737089 instead of the format dd/MM/yyyy. Here is my code :

import React, { useState, useEffect } from 'react'; 
  function App() {
    const [date, setdate] = useState(Date.now())
    return (
      <div>
        <p>{date}</p>
      </div>
    );
  }

export default App;

Here is my code : https://codesandbox.io/s/nostalgic-engelbart-tzbxv?file=/src/App.js

Do you know how can I do this ?

Thank you very much !



from Recent Questions - Stack Overflow https://ift.tt/2V292iT
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)