code: func builtinTimestampDiff(args []types.Datum, ctx context.Context) (d types.Datum, err error) {
  	sc := ctx.GetSessionVars().StmtCtx
  	t1, err := convertDatumToTime(sc, args[1])
  	if err != nil {
  		return d, errorOrWarning(err, ctx)
  	}
  	t2, err := convertDatumToTime(sc, args[2])
  	if err != nil {
  		return d, errorOrWarning(err, ctx)
  	}
  	if t1.InvalidZero() || t2.InvalidZero() {
  		return d, errorOrWarning(types.ErrInvalidTimeFormat, ctx)
  	}
  
  	v := types.TimestampDiff(args[0].GetString(), t1, t2)
  	d.SetInt64(v)
  	return
  }
docs: // https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_timestampdiff