You are correct about needing to specify the dwell value in milliseconds. However, the RepRap Wiki indicates that you need to use the `Pn` argument, and not just an unadorned number as the argument to the command. To adapt the Wiki's own example, you will need to use:
G4 P30000
This should cause the firmware to dwell (pause) for 30 seconds.
RepRap Wiki: G4: Dwell