The procedure applies to the assigning of expiry dates for milk products.

or
The procedure applies to the assignment of expiry dates for milk products.

Which is correct?

Both are o.k., but the second is better.