use the equation
d*sinx=n*wavelength
where d is the spacing of the diffraction grating, x is the angle at which the order is seen, n is the order.
remember to use S.I units for d and wavelength so convert nm to m or mm to m e.Take Care.
and if your told a diffraction grating has for example 500 lines per metre, you have to remember this is not the spacing, to get the spacing you have to do 1/500. This should help you out a little.