You need to hire an experienced criminal attorney to review your criminal history. The max time will depend on any prior criminal convictions. Next time don't post any specific facts on this website. This information is public and can be used against you.
Former Prosecutor and Family Court Law Clerk. I am available for phone consultations at (914) 368-2646. This answer is very general and is not intended to be specific legal advice and does not create any attorney/client relationship. Please consult an attorney with the specifics of your case to determine your best course of action in or out of court
Assuming your prior was a non-violent felony, a D felony second time offender gets not less than 4 years and not more than 7 years, indeterminate. You might have to owe some time on your 1st conviction since your probation will be violated if not rolled in.
If you found this "helpful" or "best answer," please click it with my appreciation. My response is for educational purposes and does not constitute legal advice nor creates an attorney client relationship which requires all the details and a personal conference.