title: Formatting date and time using Moment with React JS
body: <p>I'm new into coding and I'm trying to format date as <code>DD/MM/YYYY</code> and time as <code>HH:MM</code> using React Moment. I tried many methods with no success. It would be great if anyone could help me with this issue, as I'm still learning the basics.</p>
  <p>How am I supposed to format <code>{props.date}</code> and <code>{props.time}</code> to make it more user-friendly?</p>
  <p>Here's the code that I have:</p>
  <pre><code>import React, { Component } from &quot;react&quot;;
  import CreatedAtShow from &quot;./CreatedAtShow&quot;;
  import { Opportunities } from &quot;../requests&quot;;
  import { OpportunityShowPage } from &quot;./OpportunityShowPage&quot;;
  import moment from &quot;react-moment&quot;;
  
  function OpportunityDetails(props) {
    return (
          &lt;div&gt;
                &lt;h2&gt;
                    Opportunity: &lt;br /&gt;
                    {props.title}
                &lt;/h2&gt;
                &lt;p&gt;&lt;/p&gt;
                &lt;h3&gt;
                    Description: &lt;br /&gt;
                    {props.description}
                &lt;/h3&gt;
                
                &lt;p&gt;Tag:{props.tags}&lt;/p&gt;
                &lt;p&gt;Date:{props.date}&lt;/p&gt;
                &lt;p&gt;Time: {props.time}&lt;/p&gt;
                &lt;p&gt;Where: {props.where}&lt;/p&gt;
                &lt;p&gt;Contact information: {props.contact}&lt;/p&gt;
                &lt;p&gt;&lt;CreatedAtShow created_at={props.created_at} /&gt;&lt;/p&gt;    
    
                &lt;button className=&quot;ui button&quot;
                  onClick={() =&gt; {
                      props.editOpportunity(props.id);
                  }}
                  &gt; 
                  Edit 
                &lt;/button&gt;
  
                &lt;button className=&quot;ui button&quot;
                
                    onClick={() =&gt; props.deleteOpportunity(props.id)
                      // props.deleteOpportunity(props.id);
                    }&gt; 
                    Delete 
                &lt;/button&gt;
          &lt;/div&gt;
    );
  }
  
  export default OpportunityDetails;
  </code></pre>