I have following moment expression:
<DialogContent>
{startDate ? (
<DateTimePicker
value={startDate}
onChange={(value: any) =>
setStartDate(moment(value).format())
I would like to convert to date-fns format, but it fails, it is always 1970 something, why? I converted like this:
setStartDate(getUnixTime(new Date(value)))