Last active
August 13, 2017 18:49
-
-
Save thurask/468e07d8f7edd81fe669036bf5108efd to your computer and use it in GitHub Desktop.
Convert BB DMY stamp to human readable date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dconv(datecode): | |
table = "123456789ABCDEFGHIJKLMNOPQRSTUV" | |
dd, mm, yy = datecode.upper() | |
dx = table.index(dd) + 1 | |
mx = table.index(mm) + 1 | |
yx = table.index(yy) + 2001 | |
return "{0}/{1:0>2}/{2:0>2}".format(yx, mx, dx) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment