ADMIN_PersonalIdentityNumber_GetGender

 Show all Hide all

Deprecated.

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

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

Type: Scalar function
Area of use: General use

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)