Brian Dunning's FileMaker Custom Functions

ValidateCPR ( CPR )

Validates Danish CPR-number

  Average rating: 4.9 (20 votes) Log in to vote

jra@rtm.dk   jra@rtm.dk
RTM Insurance Brokers A/S
http://www.rtm.dk/

Share on Facebook Share on Twitter

  Sample input:
ValidateCPR ( "070777-1119" )
  Sample output:
1
1
07/07/1977
Mand

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

We have ID numbers in Denmark called CPR - Det Centrale PersonRegister- which has been in use since my birth year, 1968. Back then, bytes were expensive, so the biggest problem was that full years (four digits) were not used.

There are validation criteria that are well described:
http://da.wikipedia.org/wiki/CPR-nummer#Kontrol_af_personnummer

This function returns information on validity, date of birth, and gender, given the string.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: