There is no set time limit. You can generate an e-invoice within a few days after the date of the B2B invoice. However, it is recommended for you generate IRN within the Time of Supply provisions of the CGST Act.