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.

Under construction. Email me your wish list for improvements.