ADMIN_PersonalIdentityNumber_GetGender

Deprecated. Don't use for new development and try to migrate existing uses.

Type: Scalar function

This function extracts the persons sex from a swedish personal identity number (personnummer).

Supported input formats:
yymmddNNNK
yymmdd-NNNK
yymmdd+NNNK
YYyymmddNNNK

Return value: char(1)

The return value is "M" if male and "F" if female. Invalid or incorrectly formatted personal identity numbers give a return value of null.

Parameters

@PersonalIdentityNumber mandatory varchar(8000)