This page can help you calculate the daily random seed (also known as the group seed) in Pokémon Diamond, Pearl, Platinum, HeartGold, and SoulSilver. It can also calculate what the seed will be for arbitrary dates, given the known seed for a given date.
The daily random seed controls:
Once you have obtained your daily random seed, save it somewhere along with the date for which it is accurate, so you can then use it to calculate the random seed for any date in the future (calculator toward the bottom of this page).
The easiest way to obtain your daily random seed is by using the lotto numbers. Two consecutive lotto numbers provide enough information to narrow down the possible values of the daily random seed to at most two. In the case of two possible seed values, the daily swarming Pokémon can be used to tell them two apart.
To obtain Lottery Corner numbers:
In Diamond, Pearl, or Platinum: Speak to the attendant on the first floor of the Jubilife TV Station.
In HeartGold or SoulSilver: Speak to the attendant on the first floor of the Goldenrod Radio Tower.
After obtaining the first one, you must wait until midnight for the day to roll over to obtain the next one. Or, you can advance your system clock to 23:59, load into the game, and wait 1 minute for the day to roll over. Changing the system date will not work.
If you are playing on an emulator or flash cart, or otherwise have access to your save file, you can extract the daily random seed directly from it. This is faster and move convenient than the lotto number method, however it is "cheatier" if you are concerned about that.
The daily random seed is updated when launching the game, according to the time since the previous save, so make sure the save was created today or you otherwise know the exact date.
Note the save file is processed within the browser using JavaScript. It is not uploaded to a remote server.
Using any previously calculated seed, together with the day it was accurate for, you can calculate the daily seed for any other date.
Note if you adjust your DS date or time, or play on a different DS than usual, or change groups or mix records, this may become inaccurate and you will need to use the lotto numbers or save extractor again.
This tool will let you view daily events generated by particular daily random seed.