I don't know what's the correct grammar for below sentence:
Je pratique la natation dans le weekend.
Je pratique la natation pendant le weekend.
Both are grammatically correct, but the first one should be avoided.
"Pendant" clearly indicate a time localization, whereas "dans" indicates usually a spatial localization (there are exceptions). By using "dans" you are still grammatically correct but only because of the vagueness of "dans". Don't do that.
Other possibilities are using the synonym "durant", or simply:
Je pratique la natation le weekend.
as "weekend" is obviously a time localization.
However there is another problem in your sentences. You use indicative present but in these sentences what it means is very ambiguous. Is it an habit ? An enunciation ? Close future ? Nothing in the sentence give any clue.
En fait, ça dépend !
Si tu parles au passé de ce que tu as fait le week end tu vas dire
If you talk about something you did this week-end
J'ai pratiqué la natation ce week end
J'ai fait de la natation ce week end
Si tu veux dire que tous les week end tu fais de la natation, tu dis alors
If you used to swim every week end
Je pratique la natation le week end
Given the fact both of your attempts are quite odd, it would have helped if you would have told what you precisely intend to say but assuming you want "I practice swimming during the weekend", I would suggest:
Note that there is no need to translate "during", le week-end is enough.
"Je pratique la natation durant le week-end". "Je pratique la natation pendant le week-end" is good also, but usage for this kind of sentence is beter with "durant" ;-)