Skip to content

Instantly share code, notes, and snippets.

@brucemcpherson
Created May 8, 2014 18:30
Show Gist options
  • Save brucemcpherson/ab8d86ce1bfb10a81121 to your computer and use it in GitHub Desktop.
Save brucemcpherson/ab8d86ce1bfb10a81121 to your computer and use it in GitHub Desktop.
' use like this =displayAnOldDate(makeAnOldDate(1891,1,2))
Option Explicit
Public Function makeAnOldDate(y As Long, m As Long, d As Long) As Double
makeAnOldDate = DateSerial(y, m, d)
End Function
Public Function displayAnOldDate(oldDate As Double) As String
displayAnOldDate = Format(oldDate, "dd-mmm-yyyy")
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment