you can use momement js format function like this to get the desired part from date. If you can provide me some sample inputs and desired outputs then i can give you the exact answer. If you want to use with official moment.js npm then use below code.
If you want to get date and time from existing date then you can follow this:
<p>Date:{moment(props.date).format("DD/MM/YYYY"}</p> <p>Time:{moment(props.time).format("HH:MM")}</p> If you want today's or system date to be displayed then you can use:
<p>Date:{moment().format("DD/MM/YYYY"}</p> <p>Time:{moment().format("HH:MM")}</p> If you want to use react-moment then you can try this:
<p>Date:<Moment format="DD/MM/YYYY">{props.date}</Moment></p> <p>Time:<Moment format="HH:MM">{props.time}</Moment></p>