It's personal preference, really.
Many swim from birth. However, unless they are naturally brooded (mother) they should be in water only under supervision, and dried off thoroughly after. Even with a mom, ducklings should be restricted until they are 2-4 weeks.
Ducklings can swim unrestricted, unsupervised at 6-10 weeks- whenever they get their feathers totally in. This is when they get their oil and become "waterproof".