Problems creating a scripted field for Date only from a datetime field

This shouldn't be too complex but yet Painless is pretty painful. What I am trying to do is to get only the date from a datetime field in a format of "MMM D, YYYY" or simply "YYYY-MM-DD", so I can use it to make unique count of days for that field. I have attempted to create a scripted field and set the Type as Date and the script as this one:

ZonedDateTime zdt = ZonedDateTime.parse(
        doc['process_datetime_start'].value.toString()
    );
emit(zdt);

But this is producing this error:

Cannot cast from [java.time.ZonedDateTime] to [long]. Verify that you have correctly set the runtime field type.

The documentation is quite confusing and I don't understand how this keeps trying to parse it to Long if I set the type as Date instead?

Thanks in advance,