sql date format in react code example
Example 1: how to trim dates in react
<span className="date timeago" title={ this.props.message.createdAt }>
{new Intl.DateTimeFormat('en-GB', {
month: 'long',
day: '2-digit',
year: 'numeric',
}).format(new Date(this.props.message.createdAt))}
</span>
Example 2: how to trim dates in react
const data = upcomingWork.map(u => ({
id: u.id,
title: u.title,
start: Moment(u.created_at.format('yyyy mm dd hh m')),
end: u.created_at,
}));