if you are registered in existing law (vat/excise/service tax) than show the credit of machinery in the last return under that law......your unutilised credit of that law will be transferred in your gst electronic credit ledger......
You say you have purchased machinery on 30 th June at 6 pm but you have noticed specified whether you received it before the end of 30 th June or not.
if you have received it before the end of 30 th June you can take input credit under Rule 3 of cenvat credit and can transfer the same to GST by filling Form Trans 1.
If you received this after 30 th June i.e the capital goods remained in transit at the end of 30 th June 2017 you will not get any input credit because as per transitional provisions act is silent about input tax credit of in transit capital goods.