I think you’re misunderstanding a key point about Schengen which is free travelling across borders — to the extent that the only thing telling you you are crossing a border is a sign saying ‘Welcome to Schengen country X.’ Unless, of course, you’re travelling by train in which case there is no such sign. You either realise you crossed the border by the language the conductors are using first changing, by a notable landmark (river, sea, pass) or by noticing that the railway track looks different (e.g. Danish railways generally having rusty catenary masts).
Therefore, when taking a train from Sweden to Denmark or vice-versa, you only notice you’re crossing a border because you’re ‘flying’ across the sea. At normal times there are no passport controls, no immigration booths, no nothing. You simply get on a train at Kastrup (or at any previous stop in Copenhagen) and get off again in Hyllie (or any subsequent stop in Sweden). This is no different from a train journey Copenhagen–Odense.
Now with the large numbers of migrants in late 2015, border controls have been temporarily reintroduced. (I am fully aware that ‘temporarily’ sounds weird considering it is almost 2017 already.) However, these checks are as follows:
At the final station in Denmark, staff from the train companies quickly verify your documents that you have a valid visa or are otherwise eligible to enter Sweden. If you don’t, they don’t let you board for not complying to their terms of carriage.
At the first stop in Sweden (Hyllie), Swedish immigration police boards the train and again checks that everybody has a valid document. No visas are issued, nothing is stamped.
Therefore, there is no way of acquiring such a stamp or anything by entering Sweden from Denmark by train. In fact, you may even get into trouble there if they see you overstayed your visa — that would result in quite the opposite effect as far as I would guess.
If you want to get such a stamp/visa (if they are even issued to you on arrival, which I strongly disbelieve) by flying into Denmark, you will have to make sure that you actually came from outside the Schengen area (e.g. the UK, the Balkan, Russia, overseas) otherwise again you will not walk into any immigration control.