If you are charged with a felony and in custody, you have the right to have a preliminary hearing within 120 hours of being placed in confinement or 144 hours if a weekend or legal holiday falls within that 120 hour period. You must be released if a preliminary hearing is not timely held unless otherwise agreed or you have other holds or you have already been indicted by the grand jury.
The Criminal Procedure Law of New York sets forth the strict rules that apply to the timing of preliminary hearings and grand jury presentations. In many cases the defense attorney will agree to set the preliminary hearing for a date after the law requires, which is perfectly appropriate if it is done for the benefit of the client. If the hearing or grand jury presentation is not otherwise done in a timely manner that the defendant can be released unless there is some other good cause that a judge finds not to release the defendant. However, an untimely preliminary hearing is not reason for the case to be dismissed.